Routing

I'm curious about using routing.

Let's assuming I use my user_id for routing. If I understand it correctly,
then all documents for that user id
will be in it's own shard.

I'm not sure how this co-exists with the need to specific the # of shards
when creating an index.
Does routing automatically increase the # of shards when it sees a new
routing id or does it map
routes into the existing set of shards.

--

Hello!

Routing doesn't increase the amount of shards and will route you documents to available shards. That means that you can have documents with different user_id in a single shard, so in addition to routing you should also add filtering for the same user_id if you wan to get documents for a particular user only.

--

Regards,

Rafał Kuć

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

I'm curious about using routing.

Let's assuming I use my user_id for routing. If I understand it correctly, then all documents for that user id

will be in it's own shard.

I'm not sure how this co-exists with the need to specific the # of shards when creating an index.

Does routing automatically increase the # of shards when it sees a new routing id or does it map

routes into the existing set of shards.

--

So routing is just a way to ensure that the data is always stored in the
same shard?

But that shard could contain other users as well?

On Monday, October 1, 2012 3:09:10 PM UTC-5, Douglas Ferguson wrote:

I'm curious about using routing.

Let's assuming I use my user_id for routing. If I understand it correctly,
then all documents for that user id
will be in it's own shard.

I'm not sure how this co-exists with the need to specific the # of shards
when creating an index.
Does routing automatically increase the # of shards when it sees a new
routing id or does it map
routes into the existing set of shards.

--

Hi,

Yes, sharding means consistent indexing of documents with certain field
value(s) to a particular shard and, yes, this does not mean that that
multiple different field values cannot map and be routed to the same shard.

Otis

Search Analytics - Cloud Monitoring Tools & Services | Sematext
Performance Monitoring - Sematext Monitoring | Infrastructure Monitoring Service

On Monday, October 1, 2012 7:00:13 PM UTC-4, Douglas Ferguson wrote:

So routing is just a way to ensure that the data is always stored in the
same shard?

But that shard could contain other users as well?

On Monday, October 1, 2012 3:09:10 PM UTC-5, Douglas Ferguson wrote:

I'm curious about using routing.

Let's assuming I use my user_id for routing. If I understand it
correctly, then all documents for that user id
will be in it's own shard.

I'm not sure how this co-exists with the need to specific the # of shards
when creating an index.
Does routing automatically increase the # of shards when it sees a new
routing id or does it map
routes into the existing set of shards.

--