lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent DARON <vda...@ask.be>
Subject Re: How Can I Deal with Special Chars like #, /,
Date Thu, 11 Nov 2010 09:20:40 GMT
All the syntax for the queryparser can be found here : 
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

Escaping Special Characters

Lucene supports escaping special characters that are part of the query 
syntax. The current list special characters are

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

To escape these character use the \ before the character. For example to 
search for (1+1):2 use the query:

\(1\+1\)\:2


Regards,

Vincent DARON


Le 11/11/10 07:07, K a r n a a écrit :
> How can I search when my search term contains #, /,&. $, @,
> ',(,),{,},[,],|,\-,+,=,*,!,~,`....etc
>
> for example If I want to search C#, Asp.net, Accounting/ Audinting,
> Banking&  Financial...
> How I can prepare a search query for the above keywords
> ...
> Please let me know if anyone knows the solution...I'm doing trial and
> error from past 1 month....
> still I'm unable to find the solution.
>

-- 
Vincent DARON
ASK


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