This seems relevant. Though admittedly I haven't tried it http://stackoverflow.com/questions/10337908/how-to-properly-escape-or-and-and-in-lucene-query
Sent from my Windows Phone From: ABlaise Sent: 7/18/2013 9:52 PM To: java-user@lucene.apache.org Subject: Searching for words begining with "or" Hi everyone, I am new to this forum, I have made some research for my question but I can't seem to find an answer for it. I am using Lucene for a project and I know for sure that in my lucene index I have somewhere this document with these elements : Document<stored,indexed,tokenized<areaName:Portland> stored,indexed,tokenized,omitNorms<areaType:City> stored,indexed,tokenized,omitNorms<city:Portland> stored,indexed,tokenized,omitNorms<state:OR>>. I am looking for it but this query doesn't work : "(+areaType:(City OR Neighborhood OR County) +areaName:portland*) AND *(city:or* OR state:or*)*" and I have tried tons of alternatives (o*, o*r, ...). Lucene seems to mistake 'or' for the OR operator. How should I do to be more precise ? To add precision to my question, this String goes through a QueryParser with a StandardAnalyzer before being searched for in the index. Any help would be welcomed ! Thanks in advance, Adrien -- View this message in context: http://lucene.472066.n3.nabble.com/Searching-for-words-begining-with-or-tp4079018.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org