Hum, You don't have a document weight you have a Document Score in relation of other documents on the index during a search event. On practice the document weight will be the sum of the weight of the terms in relation with an Index.
You might find this presentation useful. http://www.cs.cmu.edu/~wcohen/whirl-talk.pdf Lucene terms weight and document scoring is a similar model. On Fri, Apr 11, 2014 at 11:41 AM, Rune Stilling <s...@rdfined.dk> wrote: > Hi list > > Normally when I search with multiple terms using a BooleanQuery the > calculated weights of each term are added/summed together to give a > document the final score. Lets say thats fine for most fields in my index. > I'll name these fields F1 and F2. So a weight is calculated likes this: > > doc weight = f1_weight + f2_weight > > Now I add a third field (F3) for which I want a different score > calculation. If theres a match in this field I would like to multiply this > field weight with the sum of the other weights, like this: > > doc weight = (f1_weight + f2_weight) * f3_weight > > This is a kind of query dependent document boost. > > I can't find out where to determine/control this behavior in Lucene i.e.. > how the document weight is calculated from each term weight. > > With regards, > Rune Stilling > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >