Maybe "A" and "B" are getting eliminated by your Analyzer?
a and b are in the list of stop words, no?
And A and B are lowercased.
Or is this just an example?

Try bq.toString()
Try adding just one Query to it
etc.
etc.

Otis

--- aaz <[EMAIL PROTECTED]> wrote:
> Hi,
> Suppose I want to match documents where fieldX is equal to "A" OR
> "B". Is the following correct?
> 
> BooleanQuery bq = new  BooleanQuery();
> 
> Term a = new Term("fieldX","A");
> Term b = new Term("fieldX","B");
> 
> TermQuery tqA = new TermQuery(a);
> TermQuery tqB = new TermQuery(b);
> 
> bq.add(tqA,false,false);
> bq.add(tqB,false,false);
> 
> Then the code searches on bq
> 
> Does this do what I want? I can't get it to work.
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@;jakarta.apache.org>

Reply via email to