Multiple indices


(Huy Phan) #1

Hi all,
I have been using Solr for a long time, they support multicore and
configuration for each core is defined in xml files.
I know that Elastic Search supports multiple indices and multiple
types per index. From the document, I see that configuration for each
index must be set through API. Is it possible to configure them in
YAML or JSON configuration file, just like what Solr have done with
multicore ?

Regards,
Huy Phan


(Shay Banon) #2

In any case you need to use the API to create indices, so you can simply add the settings there. You can have index level configuration in the elasticsearch.(yml|json) under the index section, and that will be inherited by all indices created, but, custom settings will need to go through the API.
On Saturday, May 21, 2011 at 12:18 PM, Huy Phan wrote:

Hi all,
I have been using Solr for a long time, they support multicore and
configuration for each core is defined in xml files.
I know that Elastic Search supports multiple indices and multiple
types per index. From the document, I see that configuration for each
index must be set through API. Is it possible to configure them in
YAML or JSON configuration file, just like what Solr have done with
multicore ?

Regards,
Huy Phan


(Karussell) #3

The good thing with ElasticSearch compared to Solr is that you create
separate types and indices. also the replication + sharding setup is
very easy (see below).

So just create one json (or mapping via API) for every document type.
Then create indices on demand (either one index per type or you can
also mix them into one index):

curl -XPUT "http://localhost:9200/yourindex/" -d '
index :
number_of_shards : 3
number_of_replicas : 1
refresh_interval : 10s
'


(system) #4