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 Bernd Fehling <be...@uni-bielefeld.de> on 2013/01/31 10:31:04 UTC
Solr4.1 changing result order FIFO to LIFO
Hi list,
I recognized that the result order is FIFO if documents have the same score.
I think this is due to the fact that documents which are indexed later get a higher
internal document ID and the output for documents with the same score starts
with the lowest internal document ID and raises.
Is this right so far?
I would be pleased to get LIFO output. Documents with the same score but indexed later
are "newer" (as seen for my data) and should be displayed first.
Sure, I could use sorting, but sorting is always time consuming.
Whereas the output as LIFO is just starting with highest internal document ID first for
documents with the same score.
Is there anything like this already available?
If not, any hint where to look at (Lucene or Solr)?
Regards
Bernd
Re: Solr4.1 changing result order FIFO to LIFO
Posted by Yonik Seeley <yo...@lucidworks.com>.
On Sun, Feb 3, 2013 at 7:46 AM, Erick Erickson <er...@gmail.com> wrote:
> Nope. Problem is that the tie breaker is the internal Lucene Doc id. Which
> a long time ago was invariant, that is a document indexed later always had
> a larger internal doc id. But the various merge policies can combine
> segments such that the internal IDs can change relative to one another....
>
> So I think you're stuck with sorting.
Right. And for Solr 4, one can sort on the _version_ field to get
newest or oldest first.
-Yonik
http://lucidworks.com
Re: Solr4.1 changing result order FIFO to LIFO
Posted by Erick Erickson <er...@gmail.com>.
Nope. Problem is that the tie breaker is the internal Lucene Doc id. Which
a long time ago was invariant, that is a document indexed later always had
a larger internal doc id. But the various merge policies can combine
segments such that the internal IDs can change relative to one another....
So I think you're stuck with sorting.
Best
Erick
On Thu, Jan 31, 2013 at 4:31 AM, Bernd Fehling <
bernd.fehling@uni-bielefeld.de> wrote:
> Hi list,
>
> I recognized that the result order is FIFO if documents have the same
> score.
> I think this is due to the fact that documents which are indexed later get
> a higher
> internal document ID and the output for documents with the same score
> starts
> with the lowest internal document ID and raises.
> Is this right so far?
>
> I would be pleased to get LIFO output. Documents with the same score but
> indexed later
> are "newer" (as seen for my data) and should be displayed first.
>
> Sure, I could use sorting, but sorting is always time consuming.
> Whereas the output as LIFO is just starting with highest internal document
> ID first for
> documents with the same score.
>
> Is there anything like this already available?
>
> If not, any hint where to look at (Lucene or Solr)?
>
> Regards
> Bernd
>