Open alemhnan opened 6 years ago
Never used it, but you can specify the connection settings in the repository options.
The repository options are these: https://github.com/adrai/node-viewmodel/blob/master/README.md (there are 2 different elasticsearch versions)
We use it in production with Elasticsearch 6.1, you should specify your index mappings, settings and ca. in the collection definition and then everything should work pretty much the same.
I've some doubts about defineCollection and defineViewBuilder for elasticsearch, can you post some example?
Yes! thanks, now is working. I didn't get how to set the _index and the _type. Looks like that the lib create a string composed by index.collectionName for _index and _type. Is there a method for set them?
Well, the whole thing was written with Elasticsearch 6.X in mind, this means that each index can have only one type and the types will be removed as a whole from Elasticsearch in the future, that is the reason why we left only the index configurable.
I wasn't aware of this, makes sense. Thank you.
Hello again, I'm stuck with this issue that happen when I replay all the events:
vm.version = res._version; TypeError: Cannot read property '_version' of undefined
It seems to work fine when I'm working with an small event store. The issue happens when I work with a huge one. Do you know what could be the problem?
Apologies for the maybe silly question, is Elasticsearch supported in the denormalization?
I see that I can specify settings for a collection, but I don't see, at least in the docs, where to set up the connection to Elasticsearch.