whoosh
whoosh copied to clipboard
trying to find all content containing "?"
Hi,
I am trying to find all content containing "?" and I read from the document that I could use Regex to do it... however, when I tried below,
qp = qparser.QueryParser("comments", ix)
qp.add_plugin(qparser.RegexPlugin())
query_str=qp.parse(r"\?")
results = searcher.search(query_str, limit=topN, terms=True)
I am receiving an error: TypeError: argument of type 'FileIndex' is not iterable
Not sure what I did wrong here..
The second argument to QueryParser is the schema, not the index.
On Aug 23, 2021, at 12:53 PM, llu13701 @.***> wrote:
Hi,
I am trying to find all content containing "?" and I read from the document that I could use Regex to do it... however, when I tried below,
qp = qparser.QueryParser("comments", ix) qp.add_plugin(qparser.RegexPlugin()) query_str=qp.parse(r"\?")
I am receiving an error: TypeError: argument of type 'FileIndex' is not iterable
Not sure what I did wrong here..
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.