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 support #70

Open
alemhnan opened this issue Jan 16, 2018 · 8 comments
Open

Elasticsearch support #70

alemhnan opened this issue Jan 16, 2018 · 8 comments

Comments

@alemhnan
Copy link
Contributor

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.

@adrai
Copy link
Contributor

adrai commented Jan 16, 2018

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)

@nanov
Copy link
Contributor

nanov commented Jan 17, 2018

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.

@tommiii
Copy link
Contributor

tommiii commented Mar 22, 2018

I've some doubts about defineCollection and defineViewBuilder for elasticsearch, can you post some example?

@nanov
Copy link
Contributor

nanov commented Mar 23, 2018

Something like this?

@tommiii
Copy link
Contributor

tommiii commented Mar 23, 2018

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?

@nanov
Copy link
Contributor

nanov commented Mar 23, 2018

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.

@tommiii
Copy link
Contributor

tommiii commented Mar 23, 2018

I wasn't aware of this, makes sense. Thank you.

@tommiii
Copy link
Contributor

tommiii commented Apr 6, 2018

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?

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

No branches or pull requests

4 participants