lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Searching for a special character
Date Wed, 24 Jun 2009 18:11:19 GMT
First, I highly, highly recommend you get a copy of Luke to examineyour
index. It'll also help you understand the role of Analyzers.

Your first problem is that StandardAnalyzer probably removes
the open and close parens. See:
so you can't search on them *even if* you escape the
terms in your query parsing correctly, see: Special

You want to understand the implications of whatever
analyzer you choose, or progress will <G>.

Luke will allow you to try different Analyzers and see the results of
queries, which will be a fine place to start...


On Wed, Jun 24, 2009 at 1:30 PM, Radha Sreedharan <> wrote:

> Hi all,
> I am using a Standard analyzer on both my search field and my query.
> I use a  SpanNearQuery to search on the search field.
> One of the query terms has  special characters like ( - round open bracket
> and ) - round close bracket  : How does Lucene handle this?
> Also, the search field has ( and  ) : How does Lucene handle this? Is it
> treated as white space and ignored?
> Is it possible to search for special characters ? ie if my query has ) then
> it should search for it and only if my search field has ) , it should give
> me a hit.
> Regards,
> Radha

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