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

Compatibilty with Elasticsearch 6.3 #639

Open
ricardolimaui opened this issue Jun 26, 2018 · 1 comment
Open

Compatibilty with Elasticsearch 6.3 #639

ricardolimaui opened this issue Jun 26, 2018 · 1 comment

Comments

@ricardolimaui
Copy link

ricardolimaui commented Jun 26, 2018

This is compatible with 6.3 version ? I'am not getting any results.. Any working example? Thank you

@meecect
Copy link

meecect commented Oct 21, 2019

I had to modify the 'body' attribute to something like this:

export const PostsElasticIndex = new Index({
  collection: Posts,
  name: 'postsElasticIndex',
  fields: ['title','content'],
  engine: new ElasticSearchEngine({
    body: function(body, options) {
      delete body.fields;
      delete body.sort;
      body._source= '_id';
      return body;
     } // modify the body that's sent when searching
  }),
  defaultSearchOptions: { limit: 25 }, // default options when searching

})

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

3 participants