lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: Fine Tuning Lucene implementation
Date Wed, 25 Jul 2007 17:39:22 GMT

On Jul 25, 2007, at 1:26 PM, Askar Zaidi wrote:

> Hey guys,
>
> One last question and I think I'll have an optimized algorithm.
>
> How can I build a query in my program ?
>
> This is what I am doing:
>
> QueryParser queryParser = new QueryParser("contents", new
> StandardAnalyzer());
>
>  queryParser.setDefaultOperator(QueryParser.Operator.AND);
>
>  Query q = queryParser.parse(queryString);

Just concatenate it onto your string:

  Query q = queryParser.parse(queryString + " +" + itemID);



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


Mime
View raw message