Skip to navigation
Search starts with in Whoosh python search
24.01.22
example: async def get_data_name(self, k, _max=10000, _key='author'): print("...get data") data = [] ix = open_dir('crons/ibook_authors_name') with ix.searcher(weighting=scoring.Frequency) as searcher: parser = QueryParser(_key, ix.schema, group=qparser.OrGroup) #parser.add_plugin(qparser.RegexPlugin()) #parser.add_plugin(qparser.PrefixPlugin()) #parser.add_plugin(qparser.FuzzyTermPlugin()) #print(dir(parser)) #print(parser.plugins) po = parser.parse(k+'*') result = searcher.search(po,limit=_max) print(result) for i in result: row = { dict(i)[_key] : dict(i)[_key], } data.append(row) return data
https://whoosh.readthedocs.io/en/latest/indexing.html
Reply
Anonymous
Information Epoch 1732513513
Choose portability over efficiency.
Home
Notebook
Contact us