ravendb / ravendb-nodejs-client

RavenDB node.js client
MIT License
63 stars 32 forks source link

How to create multi-map index using this library? #238

Closed airmanx86 closed 4 years ago

airmanx86 commented 4 years ago

I tried to do the following in the constructor of the index but did not work

this.map = `map(xxx);map(yyy);`;

Just one map like below works:

this.map = `map(xxx)`;

This multi-map index supported by this library at all?

airmanx86 commented 4 years ago

Worked it out there is a AbstractJavaScriptIndexCreationTask which would allow for multi-map index like below

this.maps = new Set(['map(xxx)','map(yyy)']);

Could you please add more details about index creation to the readme and the online documentation please?

ayende commented 4 years ago

Try looking here: https://ravendb.net/docs/article-page/5.0/java/indexes/multi-map-indexes The item you want is AbstractMultiMapIndexCreationTask,

Here is what this looks like: https://github.com/ravendb/ravendb-nodejs-client/blob/93b33ff29f22860c8663b568d830ac1d70809c72/test/Ported/Queries/HighlightsTest.ts#L30