lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Murarka <ankit.mura...@rancoretech.com>
Subject Providing special characters in input when using QueryParser.
Date Tue, 10 Sep 2013 06:49:41 GMT
Hello,
         I am using StandardAnalyzer for indexing all the documents.

While Searching say for Boolean/Wildcard/Prefix query, I am using 
*QueryParser* for the user supplied input.

But when I supply / as an input along with some characters like:

<param name="name" value="WSTFGH1028"/>\

I get a lexcial error due to presence of special characters in the code.

When I supply the same phrase in PhraseQuery, I get the required hit.. 
Understood that PhraseQuery and QueryParser handles query differently.

How can I achieve this. Accepting special characters also in user 
supplied inputs. I cannot make any changes in the indexing process . 
Also inputs like this will be very common from the user end..

Kindly guide.

TIA.

-- 
TIA
Regards

Ankit Murarka

"What lies behind us and what lies before us are tiny matters compared with what lies within
us"


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