You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Yonik Seeley <yo...@apache.org> on 2007/09/07 03:00:14 UTC

Re: removing a field from the relevance calculation

On 9/6/07, Bart Smyth <bs...@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