lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Jones <TJo...@hoovers.com>
Subject Re: Can I prevent Sort fields from influencing score?
Date Wed, 02 Jun 2004 19:21:24 GMT
This seems like it would be determined by how you generate your query - if
your query doesn't search in the sorted fields, they shouldn't affect the
scoring of your documents ...


> -----Original Message-----
> From: Andy Goodell [mailto:goodell@gmail.com]
> Sent: Wednesday, June 02, 2004 12:22 PM
> To: lucene-user@jakarta.apache.org
> Subject: Can I prevent Sort fields from influencing score?
> 
> 
> 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: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message