lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AHMET ARSLAN <iori...@yahoo.com>
Subject Re: Wildcard searches and document boost
Date Sat, 19 Dec 2009 18:43:41 GMT
> For instance, when searching for "wash*" I want
> "Washington" (the city) to
> appear before "Washington Park", so I have boosted the
> "Washington"
> document. Unfortunately, when using WildcardQuery, the
> score is always 1.0.
> 
> Luke says my query has been rewritten to
> "ConstantScore(myField:wash*), so
> that sort of explains what's going on. But why? And short
> of sorting the
> result, what is the solution to my problem?

You need to change multiTermRewriteMethod of QueryParser.
qp.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);


      

---------------------------------------------------------------------
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