lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: removing a field from the relevance calculation
Date Fri, 07 Sep 2007 01:00:14 GMT
On 9/6/07, Bart Smyth <bsmyth@educationau.edu.au> wrote:
> I'm having trouble getting a field of type SortableFloatField to not
> weigh into to the relevancy score returned for a document.
>
> <fieldtype name="sfloat" class="solr.SortableFloatField"
> sortMissingLast="true" omitNorms="true"/>
>
> So far I've tried boosting the field to 0.0 at index time using this
> field type - and also implemented a custom Similarity implementation
> that overrode lengthNorm(String fieldname, int numTerms) after
> converting the field to a text field.
>
> Nothing I do seems to affect the behavior that when the value of the
> field in question changes, the score of the document changes along with
> it.

Perhaps it's a coincidence that when you change the value of that
field (presumably by re-indexing the document) that the relevancy
score changes.  The relevancy score can change somewhat because lucene
deleted documents are only marked for deletion until a segment merge
removes them, and the terms in that document still count in the idf
factor (inverse document frequency).   To test this theory, optimize
the index after you change the value each time.

-Yonik

Mime
View raw message