cancel
Showing results for 
Search instead for 
Did you mean: 

How to search text with special character?

razieltd
Champ in-the-making
Champ in-the-making
Hi all!

How can i reserch a text property with special character insiede the string to research with lucene?

for example if i need to search        Today is a beautiful "day"!    how can i escape the " caracter?

webescript java baked


THX
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

If the field is tokenised then punctuation characters will have been stripped .
If untokenised you can escape " using \"

The following characters require escaping and have special meaning in lucene:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \


Andy