lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: character like &,+,.. getting ignored in search
Date Fri, 16 Mar 2007 13:16:04 GMT
What analyzers are you using at index and search time? I suspect
that the '&' is being removed both at index and search. So, you've
only indexed the tokens 'a' and 'b' and by the time you get out
of the query parser, you're only searching for terms 'a' 'b'.

Did you bother using query.toString() to examine the parsed results?
Did you try using Luke to see what was in your index?
Did you try using Luke to see how the queries parsed under
various analyzers? I suspect you'd get your answers much
faster if you tried this first.

Erick

On 3/16/07, ruchi thakur <ruchithakur1@gmail.com> wrote:
>
> Hi all,
> I am using StopAnalzer for indexing and searching. Am searching for
> phrases.
>
>
> q1 -> "a b"
> this query gives me all documents conatining a b , but also gives
> documents conatining a & b
>
> again q2 -> "a & b"
> this query q2 gives documents conatining a & b, but also gives
> documents conatining a b
>
> How can i resolve this. I only want a b for query q1
> and i only want a & b for query q2
>
> If any ideas, please help.
>
> Regards,
> Ruchi
>

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