79579808

Date: 2025-04-17 17:47:57
Score: 2
Natty:
Report link

After struggling with the exact same issue in PyLucene 10.0.0, I've found the solution via https://github.com/fnp/pylucene/blob/master/test/test_PyLucene.py#L149

You are supposed to use parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer). So you are missing flags field.

E.g.:

fields = ["Post", "Title", "Comments", "Subreddit"]
SHOULD = BooleanClause.Occur.SHOULD
query = MultiFieldQueryParser.parse(query, fields, [SHOULD, SHOULD, SHOULD, SHOULD], analyzer)
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: anonymous847294544k9887