As far as I know, the secondary sort really kicks in only when there is a tie caused by the primary sort, so the secondary sort should not be affecting the primary sort.
Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- From: Tobias Lohr <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Saturday, January 12, 2008 7:52:49 PM Subject: Sorting by multiple fields (conditions influencing each other?!) I'm sorting the search result using multiple fields. Some of them are "real" fields, within the index, but one is a "pseudo" field, a custom sort field, implemented by using a custom SortComparatorSource. I end up with the sorting conditions in exact this order: 1. Sort by score generate by custom SortComparatorSource (SortField.FLOAT, ascending, score is either 0.0 or 0.1), it's like a grouping 2. Sort by real index field (SortField.AUTO, descending, value ranges from 0 to 6) Is it guaranteed, that the 2nd sorting condition, does not influence the 1st one in any way, and that the results are everytime "grouped" by the 1st condition? It's like that high values of the real index field used in the 2nd condition are sometimes have an impact on the grouping of condition one. Any suggestions? Tobias --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]