Personally I'd just let it do the default "hash <uniqueKey> modulo #shards".

I don't see how you could shard based on location and I don't know
why you'd want to. Let's say you have some kind of restriction like
"we'll never return a doc from any state except the one our location is in".
So you'd have your
Michigan shard, your Ohio shard, your California shard etc. When
you run your query, you'd be concentrating _all_ of the computations on
exactly one shard rather than having N shards do the computation.

Best,
Erick

On Wed, May 11, 2016 at 12:32 AM, chandan khatri
<chandankhat...@gmail.com> wrote:
> Hi All,
>
> I've an application that has location based data. The data is expected to
> grow rapidly and the search is also based on the location i.e the search is
> done using the geospatial distance range.
>
> I am wondering what is the best possible way to shard the index. Any
> pointer/input is highly appreciated.
>
> Thanks,
> Chandan

Reply via email to