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/06/07 15:35:49 UTC

Solr Cloud Query Question

I am currently experimenting with the Solr Cloud code on trunk and just had
a quick question.  Lets say my setup had 3 nodes a, b and c.  Node a has
1000 results which meet a particular query, b has 2000 and c has 3000.  When
executing this query and asking for row 900 what specifically happens?  From
reading the Distributed Search Wiki I would expect that node a responds with
900, node b responds with 900 and c responds with 900 and the coordinating
node is responsible for taking the top scored items and throwing away the
rest, is this correct or is there some additional coordination that happens
where nodes a, b and c return back an id and a score and the coordinating
node makes an additional request to get back the documents for the ids which
make up the top list?

Re: Solr Cloud Query Question

Posted by yayati <ya...@gmail.com>.
 Hi Solr-users,

I am trying to set up solr cloud using solr trunk and followed example c of
solrcloud wiki . Instead of running all instances on same server. I have two
servers. ServerA and ServerB.


Set up is created with numShard=2

ServerA has 1 leader and 1 replica running on port 8983 and 8900
Server B has 1 leader and 1 replica running on port 7574 and 7500.

They all are using single embedded zookeeper server of 9983 . Cloud set up
on admin page shows all node green and up. Now problem is i committed a
document from exampledocs mem.xml on 8983 and 7574. Now when i fire query on
8983 and 8900 it show result.

But when i fire query on 7574 and 7500 i.e serverB, it it showing error ,

org.apache.solr.client.solrj.SolrServerException: No live SolrServers
available to handle this request:[http://serverA:8900/solr/collection1,
http://serverB:8983/solr/collection1]

Can someone help why this error coming. Since all nodes are up and green.
Why serverA is not able to connect to server B.??

Please respond asap.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Cloud-Query-Question-tp3034472p4030830.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Cloud Query Question

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Jun 7, 2011 at 1:01 PM, Jamie Johnson <je...@gmail.com> wrote:
> Thanks Yonik.  I have a follow on now, how does Solr ensure consistent
> results across pages?  So for example if we had my 3 theoretical solr
> instances again and a, b and c each returned 100 documents with the same
> score and the user only requested 100 documents, how are those 100 documents
> chosen from the set available from a, b and c if the documents have the same
> score?

Ties within a shard are broken by docid (just like lucene), and ties
across different shards are broken by comparing the shard ids... so
yes, it's consistent.

-Yonik
http://www.lucidimagination.com

Re: Solr Cloud Query Question

Posted by Jamie Johnson <je...@gmail.com>.
Thanks Yonik.  I have a follow on now, how does Solr ensure consistent
results across pages?  So for example if we had my 3 theoretical solr
instances again and a, b and c each returned 100 documents with the same
score and the user only requested 100 documents, how are those 100 documents
chosen from the set available from a, b and c if the documents have the same
score?

On Tue, Jun 7, 2011 at 9:38 AM, Yonik Seeley <yo...@lucidimagination.com>wrote:

> On Tue, Jun 7, 2011 at 9:35 AM, Jamie Johnson <je...@gmail.com> wrote:
> > I am currently experimenting with the Solr Cloud code on trunk and just
> had
> > a quick question.  Lets say my setup had 3 nodes a, b and c.  Node a has
> > 1000 results which meet a particular query, b has 2000 and c has 3000.
>  When
> > executing this query and asking for row 900 what specifically happens?
>  From
> > reading the Distributed Search Wiki I would expect that node a responds
> with
> > 900, node b responds with 900 and c responds with 900 and the
> coordinating
> > node is responsible for taking the top scored items and throwing away the
> > rest, is this correct or is there some additional coordination that
> happens
> > where nodes a, b and c return back an id and a score and the coordinating
> > node makes an additional request to get back the documents for the ids
> which
> > make up the top list?
>
> The latter is correct - the first phase only collects enough
> information to merge ids from the shards, and then a second phase
> requests the stored fields, highlighting, etc for the specific docs
> that will be returned.
>
> -Yonik
> http://www.lucidimagination.com
>

Re: Solr Cloud Query Question

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Jun 7, 2011 at 9:35 AM, Jamie Johnson <je...@gmail.com> wrote:
> I am currently experimenting with the Solr Cloud code on trunk and just had
> a quick question.  Lets say my setup had 3 nodes a, b and c.  Node a has
> 1000 results which meet a particular query, b has 2000 and c has 3000.  When
> executing this query and asking for row 900 what specifically happens?  From
> reading the Distributed Search Wiki I would expect that node a responds with
> 900, node b responds with 900 and c responds with 900 and the coordinating
> node is responsible for taking the top scored items and throwing away the
> rest, is this correct or is there some additional coordination that happens
> where nodes a, b and c return back an id and a score and the coordinating
> node makes an additional request to get back the documents for the ids which
> make up the top list?

The latter is correct - the first phase only collects enough
information to merge ids from the shards, and then a second phase
requests the stored fields, highlighting, etc for the specific docs
that will be returned.

-Yonik
http://www.lucidimagination.com