FAQ
You could build the query up in your program, or that part of it anyway.

BooleanQuery bq = new BooleanQuery();
FuzzyQuery fq = new FuzzyQuery(...);
fq.setBoost(123f);
bq.add(fq);
...

This might be a bug in MultiFieldQueryParser - you could provide a
test case or, better, a patch.
See https://issues.apache.org/jira/browse/LUCENENET-147. Lucene.Net,
but the comment there says "would probably mean Lucene Java also
suffers from the same bug".

Presumably you've read the "not very scalable" warning in the javadocs
for FuzzyQuery.

And you don't say what version of lucene you are using. If not the
latest, try that.


--
Ian.

On Mon, Mar 14, 2011 at 5:33 AM, chhava40 wrote:
Hi,
I am using MultiFieldQueryParser to parse query for multiple fields with
custom boosts for each field.
The issue is when one of the terms in the query is fuzzy e.g abc~.
For such a term, the field boost is not applied. If the query is "abc~ xyz"
and fields are f1 & f2 with boosts 10, 5, the parsed query output is:
(f1:abc~0.5 f2:abc~0.5) (f1:xyz^10 f2:xyz^5).
Is there any way to apply the field boost factor to fuzzy terms as well?
Thanks.

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

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedMar 14, '11 at 6:34a
activeMar 14, '11 at 12:04p
posts2
users2
websitelucene.apache.org

2 users in discussion

Chhava40: 1 post Ian Lea: 1 post

People

Translate

site design / logo © 2022 Grokbase