lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Search Expansion
Date Fri, 02 Apr 2004 21:53:44 GMT
On Apr 2, 2004, at 9:10 AM, hgadm@cswebmail.com wrote:
> Thanks for the quick reply Erik,
>
> so you mean rather than having
>
> subject:(term001 ... term800)
>
> to send through the query parser
>
> I should use
>
> (subject:term001 ... subject:term800)
>
> to pass onto the searcher directly ?
>

No, no, no.  As you found out, the compiler makes a great tester :)

BooleanQuery query = new BooleanQuery();

for each term you want to add, do this:

   query.add(new TermQuery(new Term("subject", "term" + XXX)), false, 
false);



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


Mime
View raw message