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 Jamie Johnson <je...@gmail.com> on 2011/10/10 05:30:44 UTC

Solr Cloud on solrcloud branch acting strange

I'm doing some work on the solrcloud branch in SVN and am noticing
some strange (but perhaps expected) behavior when executing queries.
I have setup a simple 2 shard cluster, indexed 50 documents into each
(verified by accessing http://localhost:8983/solr/select/?q=*:* and
http://localhost:7574/solr/select/?q=*:* each return 50) but when I
access http://localhost:8983/solr/select/?q=*:*&distrib=true&rows=0
the total count is 150.  If I play with rows, the count actually gets
more accurate as I go, i.e. if I put rows=10, the count is 140, if I
put rows=50 the count is correct (namely 100).  While I can understand
why this might be happening, it's different from the version of solr
I'm running which was built off a snapshot of trunk several months
ago.  Is this behavior expected?

Re: Solr Cloud on solrcloud branch acting strange

Posted by Jamie Johnson <je...@gmail.com>.
This problem was based on some code that I had changed, branch works
as expected, sorry to throw up this flag.

On Mon, Oct 10, 2011 at 11:15 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Sun, Oct 9, 2011 at 11:30 PM, Jamie Johnson <je...@gmail.com> wrote:
>> I'm doing some work on the solrcloud branch in SVN and am noticing
>> some strange (but perhaps expected) behavior when executing queries.
>> I have setup a simple 2 shard cluster, indexed 50 documents into each
>> (verified by accessing http://localhost:8983/solr/select/?q=*:* and
>> http://localhost:7574/solr/select/?q=*:* each return 50) but when I
>> access http://localhost:8983/solr/select/?q=*:*&distrib=true&rows=0
>> the total count is 150.  If I play with rows, the count actually gets
>> more accurate as I go, i.e. if I put rows=10, the count is 140, if I
>> put rows=50 the count is correct (namely 100).
>
> This just sounds like the query is going out to one of the shards twice.
> Solr is adjusting the total count down based on duplicates received (which
> is why the count gets more accurate as rows increases).  You should probably
> be able to see this in the logs (sub-requests have isShard=true set).
>
> Hopefully this is just a new bug due to all the flux/new code in the branch, and
> not an existing issue with "distrib=true"?
>
> -Yonik
> http://www.lucene-eurocon.com - The Lucene/Solr User Conference
>

Re: Solr Cloud on solrcloud branch acting strange

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sun, Oct 9, 2011 at 11:30 PM, Jamie Johnson <je...@gmail.com> wrote:
> I'm doing some work on the solrcloud branch in SVN and am noticing
> some strange (but perhaps expected) behavior when executing queries.
> I have setup a simple 2 shard cluster, indexed 50 documents into each
> (verified by accessing http://localhost:8983/solr/select/?q=*:* and
> http://localhost:7574/solr/select/?q=*:* each return 50) but when I
> access http://localhost:8983/solr/select/?q=*:*&distrib=true&rows=0
> the total count is 150.  If I play with rows, the count actually gets
> more accurate as I go, i.e. if I put rows=10, the count is 140, if I
> put rows=50 the count is correct (namely 100).

This just sounds like the query is going out to one of the shards twice.
Solr is adjusting the total count down based on duplicates received (which
is why the count gets more accurate as rows increases).  You should probably
be able to see this in the logs (sub-requests have isShard=true set).

Hopefully this is just a new bug due to all the flux/new code in the branch, and
not an existing issue with "distrib=true"?

-Yonik
http://www.lucene-eurocon.com - The Lucene/Solr User Conference