I would agree that shard splitting is not the best approach. Much better to design for expansion by building in layers of indirection into your application through the techniques of over-sharding, index aliasing, and multiple indices.
The non-mutually exclusive techniques are as follows. First, you can allocate more shards than you need when you create the index. If you need 5 shards today, but think you might need 10 shards in 6 months, then just create the index with 10 shards. We call this over-sharding. There really is no penalty to doing this within reason. Searching against 1 index with 50 shards is exactly the same as searching against 50 indices with one shard. Second, as others have mentioned, use multiple indices and hide them away behind an alias. Your application code should always reference aliases rather than concrete indices. It’s an extra layer of indirection that can save you a lot of operational headaches. Whenever possible, try to design for a multiple index architecture. For some people this means creating new indices per day. Other times it might mean creating an index per user. Whatever the case, it’s almost always possible to find some attribute which allows a clean logical partitioning of your data. 0xA > On Dec 11, 2014, at 3:46 PM, [email protected] wrote: > > Shard splitting is an anti-pattern if done on server side. If you really need > more shards, you have not made good planning and you can always add another > index and use index aliasing to search on both. Plus, there are export/import > tools if you want reindexing from client side. > > Jörg > > Am 11.12.2014 22:20 schrieb "Gaurav gupta" <[email protected] > <mailto:[email protected]>>: > Per, http://thinkbiganalytics.com/solr-vs-elastic-search/ > <http://thinkbiganalytics.com/solr-vs-elastic-search/> , ElasticSearch does > not suport shard spiltting which Solr supports. Is it generally an issue in > production, if yes what alternate user has :- > > > Shard Splitting > > Shards are the partitioning unit for the Lucene index, both Solr and > ElasticSearch have them. You can distribute your index by placing shards on > different machines in a cluster. Until April 2013, both Solr and > ElasticSearch would not allow you to change the number of shards in your > index. So if you decided you wanted to split your index into 10 shards on day > one, and two years later you want to add another 5 shards, you were not able > to do that without completely starting over (reindexing everything). As of > April 2013 Solr supports shard splitting > <https://issues.apache.org/jira/browse/SOLR-3755>, which allows you to create > more shards by splitting existing shards. ElasticSearch still does not > support this. > > Thanks, Gaurav > > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CALZAj3LGdMLYFPn8jX0CdhgRdP8suWTg0ekR8LcoPRc%3D1gasHg%40mail.gmail.com > > <https://groups.google.com/d/msgid/elasticsearch/CALZAj3LGdMLYFPn8jX0CdhgRdP8suWTg0ekR8LcoPRc%3D1gasHg%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFACM%2BjFMKDQp_5RS%3D2vx4hOUjADiFag8DP0faoqoqYw%40mail.gmail.com > > <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGFACM%2BjFMKDQp_5RS%3D2vx4hOUjADiFag8DP0faoqoqYw%40mail.gmail.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/F2DEE364-92F7-45D6-B7A1-FFF946D82150%40elasticsearch.com. For more options, visit https://groups.google.com/d/optout.
