Re: SolrCloud sort inconsistency

2013-01-14 Thread Erick Erickson
Unless it's a cut-n-paste error, you don't have an  in front of the sort
parameter so you're not sorting at all. You should have a sort
section in your response where the params are echoed, something like:

params:{
  sort:id desc,
  fl:id,
  cache:False,
  q:id:*,
  rows:10}},


On Sun, Jan 13, 2013 at 6:42 PM, yriveiro yago.rive...@gmail.com wrote:

 How is possible that this sorted query returns different results?

 The highest value is the id P2450024023, sometimes the value returned is
 not
 the highest.

 This is an example, the second curl request is the correct result.

 NOTE: I did the query when a indexing process was running.

 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:5,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2443605077},
   {
 id:P2443588094},
   {
 id:P2443647855},
   {
 id:P2443613193},
   {
 id:P2443572098},
   {
 id:P2443562507},
   {
 id:P2443643935},
   {
 id:P2443556464},
   {
 id:P2443625267},
   {
 id:P2443580781}]
   }}
 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:4,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2450024023},
   {
 id:P2450017490},
   {
 id:P2450062568},
   {
 id:P2450053498},
   {
 id:P2449990839},
   {
 id:P2449973572},
   {
 id:P2449957535},
   {
 id:P2450099098},
   {
 id:P2450090195},
   {
 id:P2450072528}]
   }}
 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:6,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2450024023},
   {
 id:P2450017490},
   {
 id:P2450062568},
   {
 id:P2450053498},
   {
 id:P2449990839},
   {
 id:P2449973572},
   {
 id:P2449957535},
   {
 id:P2450099098},
   {
 id:P2450090195},
   {
 id:P2450072528}]
   }}
 ➜  ~



 -
 Best regards
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SolrCloud-sort-inconsistency-tp4033046.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrCloud sort inconsistency

2013-01-14 Thread Erick Erickson
P.S. of course your sorting won't reflect documents that haven't been
committed yet. So if you straighten out the params your lists should be in
order, but the documents returned may change depending on whether your
indexing process adds docs between calls

Erick


On Mon, Jan 14, 2013 at 7:25 AM, Erick Erickson erickerick...@gmail.comwrote:

 Unless it's a cut-n-paste error, you don't have an  in front of the sort
 parameter so you're not sorting at all. You should have a sort
 section in your response where the params are echoed, something like:

 params:{
   sort:id desc,
   fl:id,
   cache:False,
   q:id:*,
   rows:10}},


 On Sun, Jan 13, 2013 at 6:42 PM, yriveiro yago.rive...@gmail.com wrote:

 How is possible that this sorted query returns different results?

 The highest value is the id P2450024023, sometimes the value returned is
 not
 the highest.

 This is an example, the second curl request is the correct result.

 NOTE: I did the query when a indexing process was running.

 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:5,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2443605077},
   {
 id:P2443588094},
   {
 id:P2443647855},
   {
 id:P2443613193},
   {
 id:P2443572098},
   {
 id:P2443562507},
   {
 id:P2443643935},
   {
 id:P2443556464},
   {
 id:P2443625267},
   {
 id:P2443580781}]
   }}
 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:4,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2450024023},
   {
 id:P2450017490},
   {
 id:P2450062568},
   {
 id:P2450053498},
   {
 id:P2449990839},
   {
 id:P2449973572},
   {
 id:P2449957535},
   {
 id:P2450099098},
   {
 id:P2450090195},
   {
 id:P2450072528}]
   }}
 ➜  ~  curl -H Cache-Control: no-cache
 http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id
 :\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 {
   responseHeader:{
 status:0,
 QTime:6,
 params:{
   cache:False,
   rows:10,
   fl:id=sort=id desc,
   q:id:*}},
   response:{numFound:2387312,start:0,maxScore:1.0,docs:[
   {
 id:P2450024023},
   {
 id:P2450017490},
   {
 id:P2450062568},
   {
 id:P2450053498},
   {
 id:P2449990839},
   {
 id:P2449973572},
   {
 id:P2449957535},
   {
 id:P2450099098},
   {
 id:P2450090195},
   {
 id:P2450072528}]
   }}
 ➜  ~



 -
 Best regards
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SolrCloud-sort-inconsistency-tp4033046.html
 Sent from the Solr - User mailing list archive at Nabble.com.





SolrCloud sort inconsistency

2013-01-13 Thread yriveiro
How is possible that this sorted query returns different results?

The highest value is the id P2450024023, sometimes the value returned is not
the highest.

This is an example, the second curl request is the correct result.

NOTE: I did the query when a indexing process was running.

➜  ~  curl -H Cache-Control: no-cache
http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id:\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
 
{
  responseHeader:{
status:0,
QTime:5,
params:{
  cache:False,
  rows:10,
  fl:id=sort=id desc,
  q:id:*}},
  response:{numFound:2387312,start:0,maxScore:1.0,docs:[
  {
id:P2443605077},
  {
id:P2443588094},
  {
id:P2443647855},
  {
id:P2443613193},
  {
id:P2443572098},
  {
id:P2443562507},
  {
id:P2443643935},
  {
id:P2443556464},
  {
id:P2443625267},
  {
id:P2443580781}]
  }}
➜  ~  curl -H Cache-Control: no-cache
http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id:\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
{
  responseHeader:{
status:0,
QTime:4,
params:{
  cache:False,
  rows:10,
  fl:id=sort=id desc,
  q:id:*}},
  response:{numFound:2387312,start:0,maxScore:1.0,docs:[
  {
id:P2450024023},
  {
id:P2450017490},
  {
id:P2450062568},
  {
id:P2450053498},
  {
id:P2449990839},
  {
id:P2449973572},
  {
id:P2449957535},
  {
id:P2450099098},
  {
id:P2450090195},
  {
id:P2450072528}]
  }}
➜  ~  curl -H Cache-Control: no-cache
http://192.168.1.241:8983/solr/ST-SHARD_0212/query\?q\=id:\*\rows\=10\fl\=id\=sort\=id%20desc\cache\=False
{
  responseHeader:{
status:0,
QTime:6,
params:{
  cache:False,
  rows:10,
  fl:id=sort=id desc,
  q:id:*}},
  response:{numFound:2387312,start:0,maxScore:1.0,docs:[
  {
id:P2450024023},
  {
id:P2450017490},
  {
id:P2450062568},
  {
id:P2450053498},
  {
id:P2449990839},
  {
id:P2449973572},
  {
id:P2449957535},
  {
id:P2450099098},
  {
id:P2450090195},
  {
id:P2450072528}]
  }}
➜  ~



-
Best regards
--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-sort-inconsistency-tp4033046.html
Sent from the Solr - User mailing list archive at Nabble.com.