Open tylerbenson opened 1 year ago
I get the same results when testing with @brentsimmons' inessential.com feed. However, that's because—as you said—that feed has a top-level author and not a per-item author.
Testing with sixcolor's feed and searching by author works for me. In the example below, I am searching for Jason Snell, and the first article has him as the author, and his name is not in the article text.
All Articles
Filtered
If you have feeds where things are potentially misbehaving, please let me know.
I'm not sure how to get the raw xml feed for that feed for comparison.
Here's an example feed with many different authors that doesn't allow filtering in this way: https://notabird.site/i/lists/1348435279527333889/rss
Thanks for looking into it.
Ah, I think I see it.
@brentsimmons If I'm reading things correctly, we are only searching article content?
func fetchArticlesMatching(_ searchString: String) throws -> Set<Article> {
var articles: Set<Article> = Set<Article>()
var error: DatabaseError? = nil
queue.runInDatabaseSync { (databaseResult) in
switch databaseResult {
case .success(let database):
articles = self.fetchArticlesMatching(searchString, database)
case .failure(let databaseError):
error = databaseError
}
}
if let error = error {
throw(error)
}
return articles
}
Perhaps the select statement could be updated to search Article.authors
too?
Actually, a better approach -- it looks like the search
virtual table could be updated to include authors, then the select statement mentioned previously would probably be fine.
Some feeds are a combination from many authors. I want to be able to filter a feed to a specific author. I expected search to work, but this only applies to the content of the post, not the author.
For example, searching the inessential feed for "Simmons" only shows one post.
That feed only has a top level author so it is a poor example of my use case. An atom feed I subscribe to has individual dc:creator tags per post.