Sorting by multiple fields (conditions influencing each other?!)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorting by multiple fields (conditions influencing each other?!)

Tobias Lohr
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sorting by multiple fields (conditions influencing each other?!)

Otis Gospodnetic-2
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 <[hidden email]>
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]