Thanks for the quick response.
Will try to do it this way:
Query q = null;
MultiFieldQueryParser par = new
MultiFieldQueryParser(Version.LUCENE_29, searchFields, analyzer, boosts);
par.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
par.setAllowLeadingWildcard(true);
q = par.parse(searchTerm);
BooleanQuery.setMaxClauseCount(65535);
Best Regards
Lutz
-----Original Message-----
From: Uwe Schindler [mailto:[email protected]]
Sent: Mittwoch, 1. Februar 2012 11:46
To: [email protected]
Subject: RE: Lucene 2.9.4 Wildcard Search, Boost and Sorting
Hi,
all MultiTermQueries are constant score by default since Lucene 2.9, you can
change that back to scoring mode:
WildcardQuery.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE)
This slows down the query immense or throws TooManyClauses exceptions if too
many terms match the wildcard.
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]
> -----Original Message-----
> From: Lutz Fechner [mailto:[email protected]]
> Sent: Wednesday, February 01, 2012 11:42 AM
> To: [email protected]
> Subject: Lucene 2.9.4 Wildcard Search, Boost and Sorting
>
> Hi,
>
> I have an issue with Lucene 2.9.4 and sorting of wildcard queries.
>
> If I set a boost to some documents during indexing like this:
>
> doc.setBoost(1000.00);
>
>
> and execute a query like this:
>
> PRODUCT_GROUP:2020*
>
>
> I don't get results with a high boost value returned before the documents
with
> no boost.
>
> In the earlier version of Lucene (2.3.2) we used before this worked fine.
>
>
> Is there a way to enable this again in 2.9.4?
>
>
>
> Thanks
>
>
> Lutz Fechner
> ____________________________________________
>
> Team Lead eContent Development
>
>
> Brühler Str. 9
> 53119 Bonn
> Tel: +49 228 6195 482
> Mobile: +49 175 7279 482
> [email protected] - www.hubwoo.com <http://www.hubwoo.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]