>         in my application i need to
> implement search functionality with
> included special characters 
> 
> ex1:if i enter search term as "(PAGE)" i am getting
> results, if i enter
> search term as "()" i am getting error .
> ex2: eventhough if i enter "{","}","@","$","%".....i need
> to get search
> results those are having that symbols
> 

Here are some possible solutions :

1-) use lucene query parser and escape all of the special characters. (There is 
a static method for this in QueryParser class)
2-) use dismax query parser and escape '+', '-' and '"'. Note that dismax 
automatically escapes remaining special characters.
3-) use termQParserPlugin or rawQParserPlugin

Reply via email to