You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erick Erickson <er...@gmail.com> on 2018/01/17 21:08:09 UTC

CloudSolrClient.idField seems confused.

IIUC idField has nothing to do with the <uniqueKey> field. It's really
the field used to route documents. Agreed, this is often the "id"
field, but still....

In fact, over in UpdateReqeust.getRoutes(), it's passed as the "id"
field to router.getTargetSlice() and just works, even though
getTargetSlice is clearly designed to route on a field other than the
<uniqueKey> if we didn't just pass null as the "route" param.

The confusing bit is that if I have a route field defined for my
collection and want to use CloudSolrClient I have to figure out that I
need to use the setIdField method to use that field for routing.

Worth a JIRA?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: CloudSolrClient.idField seems confused.

Posted by Erick Erickson <er...@gmail.com>.
SOLR-11868

On Wed, Jan 17, 2018 at 2:33 PM, David Smiley <da...@gmail.com> wrote:
> Pretty confusing indeed; I think I bumped into this.  It's worth a JIRA.
>
> BTW this is semi-related perhaps:
> https://issues.apache.org/jira/browse/SOLR-8889
>
> On Wed, Jan 17, 2018 at 4:08 PM Erick Erickson <er...@gmail.com>
> wrote:
>>
>> IIUC idField has nothing to do with the <uniqueKey> field. It's really
>> the field used to route documents. Agreed, this is often the "id"
>> field, but still....
>>
>> In fact, over in UpdateReqeust.getRoutes(), it's passed as the "id"
>> field to router.getTargetSlice() and just works, even though
>> getTargetSlice is clearly designed to route on a field other than the
>> <uniqueKey> if we didn't just pass null as the "route" param.
>>
>> The confusing bit is that if I have a route field defined for my
>> collection and want to use CloudSolrClient I have to figure out that I
>> need to use the setIdField method to use that field for routing.
>>
>> Worth a JIRA?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>
>
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: CloudSolrClient.idField seems confused.

Posted by David Smiley <da...@gmail.com>.
Pretty confusing indeed; I think I bumped into this.  It's worth a JIRA.

BTW this is semi-related perhaps:
https://issues.apache.org/jira/browse/SOLR-8889

On Wed, Jan 17, 2018 at 4:08 PM Erick Erickson <er...@gmail.com>
wrote:

> IIUC idField has nothing to do with the <uniqueKey> field. It's really
> the field used to route documents. Agreed, this is often the "id"
> field, but still....
>
> In fact, over in UpdateReqeust.getRoutes(), it's passed as the "id"
> field to router.getTargetSlice() and just works, even though
> getTargetSlice is clearly designed to route on a field other than the
> <uniqueKey> if we didn't just pass null as the "route" param.
>
> The confusing bit is that if I have a route field defined for my
> collection and want to use CloudSolrClient I have to figure out that I
> need to use the setIdField method to use that field for routing.
>
> Worth a JIRA?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com