lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Goodell <>
Subject Can I prevent Sort fields from influencing score?
Date Wed, 02 Jun 2004 17:22:22 GMT
I have been using the new lucene 1.4 SortField implementation wih some
custom fields added to old indexes so that the results can be sorted
by them.  My problem here is that some of the String fields that I add
to the index come up in the search terms, so my results in sort by
score order are different.  Here's an example:

I added the field AUTHOR_SORTABLE to most of the documents in the
index.  But if one of the AUTHOR_SORTABLE field in a document is set
to "andy", and i search for "andy", this document gets a very
different score than it used to.

Since my added fields aren't set in stone, I'm interested in a general
solution, where all fields containing the text "SORTABLE" in the name
aren't considered for matches, only for sorting.  Could I do this by
overriding Similarity?  I tried doing this to set the lengthNorm() for
each of my sortable fields to 0, but it hasnt worked yet.  Is there a
different way to store the sortable fields that will prevent this?

Any help would be greatly appreciated.

- andy g

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message