Mybe you simply don't use QueryParser for such types of Queries and instantiate TermQuery, BooleanQuery, WildCard, Prefix by hand. Then you don't need to take care of syntax, you create unambiguous objects.
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: frueskens [mailto:fruesk...@ricoh-europe.com] > Sent: Friday, June 25, 2010 12:44 PM > To: java-user@lucene.apache.org > Subject: searching for wildcard as valid character > > > Dear all, > > I have to solve the following problem but without success yet. > > We need to search for a content in a field 'name' that contains the wildcard > symbol appearing somewhere in a string. E.g. indexed string "1234*abc". > The query should ignore all others that does not contain this symbol. > A query like "name:*\**" does not work - it finds everything. > > Although if I would search for a symbol like '[' (which is also part of the query > syntax) in "1234[abc" using the query "name:*\[*" finds exactly the indexed > string. > > BTW: the string "1234*abc" was indexed as is - checked with Luke > > Any clue? > Thanks > -- > View this message in context: > http://lucene.472066.n3.nabble.com/searching-for-wildcard-as-valid- > character-tp921791p921791.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