Skip to content

Elasticsearch configure indexname / multiple indexes #530

Open
@steven-tib

Description

@steven-tib

Hi @matteodem,
I'm currently using easysearch with elasticsearch engine and I'm facing some limitations because of the hardcoded index "easysearch".

from your lib/engine.js in elasticsearch package :
`
onIndexCreate(indexConfig) {
super.onIndexCreate(indexConfig);

if (Meteor.isServer) {
  indexConfig.elasticSearchClient = new elasticsearch.Client(this.config.client);
  indexConfig.elasticSearchSyncer = new ElasticSearchDataSyncer({
    indexName: 'easysearch',
    indexType: indexConfig.name,
    collection: indexConfig.collection,
    client: indexConfig.elasticSearchClient,
    beforeIndex: (doc) => this.callConfigMethod('getElasticSearchDoc', doc, this.callConfigMethod('fieldsToIndex', indexConfig))
  });
}

}
`

Could it be possible to have it accessible and modifiable through the config options, the same way the indexType is possible to setup ?

It would help a lot with my app architecture as the mappings may change a lot during its evolution, having only one index would result in very complicated reindexing tasks. It would be the same issue if the number of shards would have to be modified.

Else is there another solution ? maybe by using aliases .. ?
Thanks for your reply.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions