lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: ComplexPhraseQueryParser with multiple fields
Date Mon, 02 May 2011 10:42:37 GMT

I've just started using the ComplexPhraseQueryParser and it works great with one field but
is there a way for it to work with multiple fields?  For example, right now the query:
job_title: "sales man*" AND NOT contact_name: "Chris Salem"
throws this exception 
Caused by: org.apache.lucene.queryParser.ParseException: Cannot have clause for field "job_title"
nested in phrase for field "contact_name"
What is the best way to work around this?

There is "Lucene-1486 non default field.patch" for that but it requires :

"Fixing this would require changing the package name of 
ComplexPhraseQueryParser or changing the visibility of "field" in the 
QueryParser base class to "protected".
Anyone have any strong feelings about which of these is the most acceptable?"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message