Re: solr cloud unique key query request is sent to all shards!

2018-02-19 Thread Ganesh Sethuraman
This works !. Both V1 and V2 version of the real time get works fine.
Just an added note, the performance (response time) also improved.

Thanks Tom

On Mon, Feb 19, 2018 at 1:17 AM, Tomas Fernandez Lobbe 
wrote:

> In real-time get, the parameter name is “id”, regardless of the name of
> the unique key.
>
> The request should be in your case: http://:8080/api/
> collections/col1/get?id=69749398
>
> See: https://lucene.apache.org/solr/guide/7_2/realtime-get.html
>
> Sent from my iPhone
>
> > On Feb 18, 2018, at 9:28 PM, Ganesh Sethuraman 
> wrote:
> >
> > I tried this real time get on my collection using the both V1 and V2 URL
> > for real time get, but did not work!!!
> >
> > http://:8080/api/collections/col1/get?myid:69749398
> >
> > it returned...
> >
> > {
> >  "doc":null}
> >
> > same issue with V1 URL as well, http://
> > :8080/solr/col1/get?myid:69749398
> >
> > however if i do q=myid:69749398 with "select" request handler seems to
> > fine. I checked my schema again and it is configured correctly.  Like
> below:
> >
> > myid
> >
> > Also i see that this implicit request handler is configured correctly Any
> > thoughts, what I might be missing?
> >
> >
> >
> > On Sun, Feb 18, 2018 at 11:18 PM, Tomas Fernandez Lobbe <
> tflo...@apple.com>
> > wrote:
> >
> >> I think real-time get should be directed to the correct shard. Try:
> >> [COLLECTION]/get?id=[YOUR_ID]
> >>
> >> Sent from my iPhone
> >>
> >>> On Feb 18, 2018, at 3:17 PM, Ganesh Sethuraman <
> ganeshmail...@gmail.com>
> >> wrote:
> >>>
> >>> Hi
> >>>
> >>> I am using Solr 7.2.1. I have 8 shards in two nodes (two different m/c)
> >>> using Solr Cloud. The data was indexed with a unique key (default
> >> composite
> >>> id) using the CSV update handler (batch indexing). Note that I do NOT
> >> have
> >>>  while indexing.   Then when I try to  query the
> >>> collection col1 based on my primary key (as below), I see that in the
> >>> 'debug' response that the query was sent to all the shards and when it
> >>> finds the document in one the shards it sends a GET FIELD to that shard
> >> to
> >>> get the data.  The problem is potentially high response time, and more
> >>> importantly scalability issue as unnecessarily all shards are being
> >> queried
> >>> to get one document (by unique key).
> >>>
> >>> http://:8080/solr/col1/select?debug=true=id:69749278
> >>>
> >>> Is there a way to query to reach the right shard based on the has of
> the
> >>> unique key?
> >>>
> >>> Regards
> >>> Ganesh
> >>
>


Re: solr cloud unique key query request is sent to all shards!

2018-02-18 Thread Tomas Fernandez Lobbe
In real-time get, the parameter name is “id”, regardless of the name of the 
unique key. 

The request should be in your case: 
http://:8080/api/collections/col1/get?id=69749398

See: https://lucene.apache.org/solr/guide/7_2/realtime-get.html

Sent from my iPhone

> On Feb 18, 2018, at 9:28 PM, Ganesh Sethuraman  
> wrote:
> 
> I tried this real time get on my collection using the both V1 and V2 URL
> for real time get, but did not work!!!
> 
> http://:8080/api/collections/col1/get?myid:69749398
> 
> it returned...
> 
> {
>  "doc":null}
> 
> same issue with V1 URL as well, http://
> :8080/solr/col1/get?myid:69749398
> 
> however if i do q=myid:69749398 with "select" request handler seems to
> fine. I checked my schema again and it is configured correctly.  Like below:
> 
> myid
> 
> Also i see that this implicit request handler is configured correctly Any
> thoughts, what I might be missing?
> 
> 
> 
> On Sun, Feb 18, 2018 at 11:18 PM, Tomas Fernandez Lobbe 
> wrote:
> 
>> I think real-time get should be directed to the correct shard. Try:
>> [COLLECTION]/get?id=[YOUR_ID]
>> 
>> Sent from my iPhone
>> 
>>> On Feb 18, 2018, at 3:17 PM, Ganesh Sethuraman 
>> wrote:
>>> 
>>> Hi
>>> 
>>> I am using Solr 7.2.1. I have 8 shards in two nodes (two different m/c)
>>> using Solr Cloud. The data was indexed with a unique key (default
>> composite
>>> id) using the CSV update handler (batch indexing). Note that I do NOT
>> have
>>>  while indexing.   Then when I try to  query the
>>> collection col1 based on my primary key (as below), I see that in the
>>> 'debug' response that the query was sent to all the shards and when it
>>> finds the document in one the shards it sends a GET FIELD to that shard
>> to
>>> get the data.  The problem is potentially high response time, and more
>>> importantly scalability issue as unnecessarily all shards are being
>> queried
>>> to get one document (by unique key).
>>> 
>>> http://:8080/solr/col1/select?debug=true=id:69749278
>>> 
>>> Is there a way to query to reach the right shard based on the has of the
>>> unique key?
>>> 
>>> Regards
>>> Ganesh
>> 


Re: solr cloud unique key query request is sent to all shards!

2018-02-18 Thread Ganesh Sethuraman
I tried this real time get on my collection using the both V1 and V2 URL
for real time get, but did not work!!!

http://:8080/api/collections/col1/get?myid:69749398

it returned...

{
  "doc":null}

same issue with V1 URL as well, http://
:8080/solr/col1/get?myid:69749398

however if i do q=myid:69749398 with "select" request handler seems to
fine. I checked my schema again and it is configured correctly.  Like below:

myid

Also i see that this implicit request handler is configured correctly Any
thoughts, what I might be missing?



On Sun, Feb 18, 2018 at 11:18 PM, Tomas Fernandez Lobbe 
wrote:

> I think real-time get should be directed to the correct shard. Try:
> [COLLECTION]/get?id=[YOUR_ID]
>
> Sent from my iPhone
>
> > On Feb 18, 2018, at 3:17 PM, Ganesh Sethuraman 
> wrote:
> >
> > Hi
> >
> > I am using Solr 7.2.1. I have 8 shards in two nodes (two different m/c)
> > using Solr Cloud. The data was indexed with a unique key (default
> composite
> > id) using the CSV update handler (batch indexing). Note that I do NOT
> have
> >  while indexing.   Then when I try to  query the
> > collection col1 based on my primary key (as below), I see that in the
> > 'debug' response that the query was sent to all the shards and when it
> > finds the document in one the shards it sends a GET FIELD to that shard
> to
> > get the data.  The problem is potentially high response time, and more
> > importantly scalability issue as unnecessarily all shards are being
> queried
> > to get one document (by unique key).
> >
> > http://:8080/solr/col1/select?debug=true=id:69749278
> >
> > Is there a way to query to reach the right shard based on the has of the
> > unique key?
> >
> > Regards
> > Ganesh
>


Re: solr cloud unique key query request is sent to all shards!

2018-02-18 Thread Tomas Fernandez Lobbe
I think real-time get should be directed to the correct shard. Try:  
[COLLECTION]/get?id=[YOUR_ID]

Sent from my iPhone

> On Feb 18, 2018, at 3:17 PM, Ganesh Sethuraman  
> wrote:
> 
> Hi
> 
> I am using Solr 7.2.1. I have 8 shards in two nodes (two different m/c)
> using Solr Cloud. The data was indexed with a unique key (default composite
> id) using the CSV update handler (batch indexing). Note that I do NOT have
>  while indexing.   Then when I try to  query the
> collection col1 based on my primary key (as below), I see that in the
> 'debug' response that the query was sent to all the shards and when it
> finds the document in one the shards it sends a GET FIELD to that shard to
> get the data.  The problem is potentially high response time, and more
> importantly scalability issue as unnecessarily all shards are being queried
> to get one document (by unique key).
> 
> http://:8080/solr/col1/select?debug=true=id:69749278
> 
> Is there a way to query to reach the right shard based on the has of the
> unique key?
> 
> Regards
> Ganesh


solr cloud unique key query request is sent to all shards!

2018-02-18 Thread Ganesh Sethuraman
Hi

I am using Solr 7.2.1. I have 8 shards in two nodes (two different m/c)
using Solr Cloud. The data was indexed with a unique key (default composite
id) using the CSV update handler (batch indexing). Note that I do NOT have
 while indexing.   Then when I try to  query the
collection col1 based on my primary key (as below), I see that in the
'debug' response that the query was sent to all the shards and when it
finds the document in one the shards it sends a GET FIELD to that shard to
get the data.  The problem is potentially high response time, and more
importantly scalability issue as unnecessarily all shards are being queried
to get one document (by unique key).

http://:8080/solr/col1/select?debug=true=id:69749278

Is there a way to query to reach the right shard based on the has of the
unique key?

Regards
Ganesh