lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amin Mohammed-Coleman <ami...@gmail.com>
Subject Special Characters and QueryParser
Date Thu, 22 Oct 2009 12:19:45 GMT
Hi

I am looking at handling special characters in the query as using certain
characters cause an exception.  I looked at QueryParser.escape(..) to handle
this. It works to a certain extent for example using '!' doesn't cause an
exception. However when I use a wildcard then the wildcard is ignored.  For
example ref* is converted to ref.  I know that the escape method looks for
particular special characters and one of them is '*'.  Is there a way to
handle special characters and not remove certain characters for example
'?'.  I'm guessing I would need to do something programmatically and add \
to the character and not apply it to * or ? or - or +.

Any help would be appreciated.


cheers
Amin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message