I've been trying to use MultiFieldParser to search across multiple
fields using AND as the default grouping operator.
If I use
analyzer = StandardAnalyzer()
qp = MultiFieldQueryParser("field1", analyzer)
qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND)
query = qp.parseQuery(q)
hits = searcher.search(query)
then it works to search the one field, but if I use
analyzer = StandardAnalyzer()
qp = MultiFieldQueryParser(["field1", "field2"], analyzer)
qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND)
query = qp.parseQuery(q)
hits = searcher.search(query)
then it fails, just saying "Aborted".
It seems like the constructor for MultiFieldQueryParser will only
take a string as the first argument, not an array - is there a way
round this?
This is PyLucene 1.9rc5.
alf.
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev