Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Special Characters and QueryParser

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


aminmc at gmail

Oct 22, 2009, 5:19 AM

Post #1 of 1 (310 views)
Permalink
Special Characters and QueryParser

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

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.