On Fri, Jan 25, 2013 at 4:09 PM, davers <[email protected]> wrote:
> I'm not sure I understand. I thought ID had to be unique.

Right - the group becomes part of the ID (the prefix), not the whole ID.

> for example
> I have the following
>
> [
> { "id" : 1, "groupid" : 1 },
> { "id" : 2, "groupid" : 1},
> { "id" : 3 "groupid : 2 }
> ]
>
> How would I currently ensure that id 1 & 2 end up on the same shard using
> the ID ?


"id" : "groupX!doc1"
"id" : "groupX!doc2"
"id" : "groupY!doc2"

Or for your data, an abbreviated

"id" : "1!1"
"id" : "1!2"

-Yonik
http://lucidworks.com

Reply via email to