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 Benson Margulies <bi...@gmail.com> on 2012/04/01 02:02:32 UTC

reproducibility of query results

I appear to be observing some unpredictability in query results, and I
wanted to eliminate Solr itself as a possible cause.

Using 1.4 at the moment. I insert a stack of document (using the
EmbeddedSolrServer) and then run a query, retrieving 200 results. (A
significant fraction of the docs in the index). Should I expect to get
precisely the same docs in the same order with the same scores every time
that I do this?

Re: reproducibility of query results

Posted by Benson Margulies <bi...@gmail.com>.
On Sun, Apr 1, 2012 at 1:05 PM, Steven A Rowe <sa...@syr.edu> wrote:

> If your results are only sorted by score, it's possible that some have
> exactly the same score.  Unless you use a secondary sort, I don't think the
> order of returned results among same-scored hits is guaranteed.  As a
> result, if you cut off hits at some fixed threshold, you could see
> different entries at the low-scoring end of the hit list. - Steve
>

THanks.


>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Sunday, April 01, 2012 12:09 PM
> To: solr-user@lucene.apache.org
> Subject: Re: reproducibility of query results
>
> i make a new index each iteration. if I insert the same docs in the same
> order, should I expect the same query results? Note that I shut down
> entirely after the adds, then in a new process run the queries.
>
> On Apr 1, 2012, at 11:37 AM, Ahmet Arslan <io...@yahoo.com> wrote:
>
> >> I appear to be observing some
> >> unpredictability in query results, and I wanted to eliminate Solr
> >> itself as a possible cause.
> >>
> >> Using 1.4 at the moment. I insert a stack of document (using the
> >> EmbeddedSolrServer) and then run a query, retrieving 200 results. (A
> >> significant fraction of the docs in the index). Should I expect to
> >> get precisely the same docs in the same order with the same scores
> >> every time that I do this?
> >
> > If your index does not change, yes you can expect this. If you
> add/delete docs score and order can change.
>

RE: reproducibility of query results

Posted by Steven A Rowe <sa...@syr.edu>.
If your results are only sorted by score, it's possible that some have exactly the same score.  Unless you use a secondary sort, I don't think the order of returned results among same-scored hits is guaranteed.  As a result, if you cut off hits at some fixed threshold, you could see different entries at the low-scoring end of the hit list. - Steve

-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: Sunday, April 01, 2012 12:09 PM
To: solr-user@lucene.apache.org
Subject: Re: reproducibility of query results

i make a new index each iteration. if I insert the same docs in the same order, should I expect the same query results? Note that I shut down entirely after the adds, then in a new process run the queries.

On Apr 1, 2012, at 11:37 AM, Ahmet Arslan <io...@yahoo.com> wrote:

>> I appear to be observing some
>> unpredictability in query results, and I wanted to eliminate Solr 
>> itself as a possible cause.
>>
>> Using 1.4 at the moment. I insert a stack of document (using the
>> EmbeddedSolrServer) and then run a query, retrieving 200 results. (A 
>> significant fraction of the docs in the index). Should I expect to 
>> get precisely the same docs in the same order with the same scores 
>> every time that I do this?
>
> If your index does not change, yes you can expect this. If you add/delete docs score and order can change.

Re: reproducibility of query results

Posted by Ahmet Arslan <io...@yahoo.com>.
> i make a new index each iteration. if
> I insert the same docs in the
> same order, should I expect the same query results? Note
> that I shut
> down entirely after the adds, then in a new process run the
> queries.

By saying a new index, you mean you create a an empty, new index? Yes, you should see same query results. (if you insert the same docs, and use same analysis)


Re: reproducibility of query results

Posted by Benson Margulies <bi...@gmail.com>.
i make a new index each iteration. if I insert the same docs in the
same order, should I expect the same query results? Note that I shut
down entirely after the adds, then in a new process run the queries.

On Apr 1, 2012, at 11:37 AM, Ahmet Arslan <io...@yahoo.com> wrote:

>> I appear to be observing some
>> unpredictability in query results, and I
>> wanted to eliminate Solr itself as a possible cause.
>>
>> Using 1.4 at the moment. I insert a stack of document (using
>> the
>> EmbeddedSolrServer) and then run a query, retrieving 200
>> results. (A
>> significant fraction of the docs in the index). Should I
>> expect to get
>> precisely the same docs in the same order with the same
>> scores every time
>> that I do this?
>
> If your index does not change, yes you can expect this. If you add/delete docs score and order can change.

Re: reproducibility of query results

Posted by Ahmet Arslan <io...@yahoo.com>.
> I appear to be observing some
> unpredictability in query results, and I
> wanted to eliminate Solr itself as a possible cause.
> 
> Using 1.4 at the moment. I insert a stack of document (using
> the
> EmbeddedSolrServer) and then run a query, retrieving 200
> results. (A
> significant fraction of the docs in the index). Should I
> expect to get
> precisely the same docs in the same order with the same
> scores every time
> that I do this?

If your index does not change, yes you can expect this. If you add/delete docs score and order can change.