BooleanQuery bQuery=new BooleanQuery();
                TermQuery tQuery=new TermQuery(new Term("title","cat"));
                bQuery.add(tQuery,BooleanClause.Occur.SHOULD);
                tQuery=new TermQuery(new Term("title","dog"));
                bQuery.add(tQuery,BooleanClause.Occur.SHOULD);

2010/6/21 danielkimo <[email protected]>:
>
> Dear all,
>
> I used lucene to index BNC Corpus(British News Corpus). However, when I
> search "have on", the result is always zero. The result is 82 from BNC
> website. I think the problem is lucene cannot search two words at the same
> time. Does anyone have the same experience? Thanks
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/can-lucene-search-more-than-one-word-tp910835p910835.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to