lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <fancye...@gmail.com>
Subject Re: can lucene search more than one word
Date Mon, 21 Jun 2010 09:54:26 GMT
		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 <danielkimo@gmail.com>:
>
> 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: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message