java-user@lucene.apache.org
[Top] [All Lists]

Re: update field boost

Subject: Re: update field boost
From: Chris Hostetter
Date: Mon, 11 Feb 2008 21:34:39 -0800 PST
: I read the doc for the api indexreader.setNorm() after I posted the question
: earlier. To use that setNorm() to modify the field boost, it seems to me that
: one has to know how the boost is folded to the norm (in the default impl, it's
: boost* lengthNorm) and has to know the old norm value which is impossible to
: get without getting all the norms for all the docs. Am I missing other apis to
: use?

you might wnat to take a look at FieldNormModifier ... it doesn't deal 
with boosts, but it shows how you can figure out the length part of the
norm.

what you are attempting is definitly non trivial, computing a norm is a 
one way function of several inputs -- you can't recompute a new norm by 
changing only one of the inputs, you have to know what all of the other 
orriginal inputs were.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>