lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Re: Handling special characters in Lucene 4.0
Date Sun, 20 Oct 2013 23:30:24 GMT
It might be helpful if you would explain, at a higher level, what you
are trying to accomplish. Where do these things come from? What
higher-level problem are you trying to solve?

On Sun, Oct 20, 2013 at 7:12 PM, saisantoshi <saisantoshi76@gmail.com> wrote:
> Thanks.
>
> So, if I understand correctly, StandardAnalyzer wont work for the following
> below as it strips out the special characters and does search only on
> searchText ( in this case).
>
> queryText = *&&searchText*
>
> If we want to do a search like "*&&**" then we need to use
> WhiteSpaceAnalyzer. Please let me know if my understanding is correct.
>
> Also, I am not sure as the following is mentioned in the lucene docs? Is the
> below not for StandardAnalyzer then? It is not mentioned that it wont work
> for StandardAnalyzer.
>
> /*
> 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
>
> */
>
> Thanks,
> Sai.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Handling-special-characters-in-Lucene-4-0-tp4096674p4096727.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message