Hi, what's the simplest way to get some results weighted without dividing by a log of document length? Basically I just want results in order of how many times any word from my search string appears in the document.
with self.ix.searcher(weighting=scoring.WeightScorer(maxweight=1)) as searcher: #wtf do i do for maxweight?
#was: with self.ix.searcher() as searcher:
query = Or([Term("searchablecontent", token.text) for token in stream])
results = searcher.search(query)
File "c:\limnoria\plugins\AIBot\plugin.py", line 46, in invalidCommand
results = searcher.search(query)
File "c:\python37-32\lib\site-packages\whoosh\searching.py", line 786, in search
self.search_with_collector(q, c)
File "c:\python37-32\lib\site-packages\whoosh\searching.py", line 817, in search_with_collector
collector.prepare(self, q, context)
File "c:\python37-32\lib\site-packages\whoosh\collectors.py", line 335, in prepare
if top_searcher.weighting.use_final:
AttributeError: 'WeightScorer' object has no attribute 'use_final'