mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Matching full URLs when searching for a feed.
This commit is contained in:
parent
fdd76f6c9f
commit
9a06d44341
1 changed files with 4 additions and 1 deletions
|
@ -395,7 +395,10 @@ class SearchFeed:
|
|||
return []
|
||||
|
||||
logging.info("~FGSearch ~FCfeeds~FG: ~SB%s" % text)
|
||||
q = pyes.query.MultiMatchQuery(['address', 'link^2', 'title^3'], text, analyzer="standard")
|
||||
q = pyes.query.BoolQuery()
|
||||
q.add_should(pyes.query.MatchQuery('address', text, analyzer="simple", cutoff_frequency=0.0005, minimum_should_match="50%"))
|
||||
q.add_should(pyes.query.MatchQuery('link', text, analyzer="simple", cutoff_frequency=0.0005, minimum_should_match="50%"))
|
||||
q.add_should(pyes.query.MatchQuery('title', text, analyzer="simple", cutoff_frequency=0.0005, minimum_should_match="50%"))
|
||||
results = cls.ES().search(query=q, size=5, doc_types=[cls.type_name()], sort="num_subscribers:desc")
|
||||
|
||||
return results
|
||||
|
|
Loading…
Add table
Reference in a new issue