Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch configure indexname / multiple indexes #530

Open
steven-tib opened this issue Sep 15, 2016 · 1 comment
Open

Elasticsearch configure indexname / multiple indexes #530

steven-tib opened this issue Sep 15, 2016 · 1 comment

Comments

@steven-tib
Copy link

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.

@matteodem
Copy link
Owner

sure, a PR would be great here. I can give you pointers if that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants