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 <[EMAIL PROTECTED]> 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