lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shane <>
Subject Space in fieldname
Date Wed, 24 Nov 2010 10:31:56 GMT

Hi there,
searched this a while, but couldn't find satisfying results.

My Projekt requires the fieldname to be able to have space characters in
them, but as a matter of fact the term does not parse as wanted for search.
Following my example.

String searchTerm = +machine supplier:(dell OR medion) AND +HD:(200 OR 500)
QueryParser parser = new QueryParser(Version.LUCENE_30, "ID", new
Query q = parser.parse(searchTerm);

System.out.println("query : " + q);

this results in th following output:

query : +ID:machine +(supplier:dell supplier:medion) +(HD:200 HD:400)

which in fact is wrong. the parser takes the first part of the fieldname
"machine supplier" and puts the default fieldname infront of it. 

The customer needs the software to support space characters in fieldnames.
Is there a way to tell the parser that this fieldname belongs together?
Am I doing anything wrong?

If anybody knows please let me know, thanks.
View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message