elasticsearch-rails icon indicating copy to clipboard operation
elasticsearch-rails copied to clipboard

Fixes `Indexer` README to work with ES 7+

Open dixpac opened this issue 5 years ago • 4 comments

Old Indexer example doesn't work on ES 7. Main problem is specifying type inside Client.index.

This PR changes the example to work.

Connected to #967

dixpac avatar Dec 06 '20 16:12 dixpac

💚 CLA has been signed

Hi @dixpac, Thank you for this contribution! Can you sign the Contributor Agreement please?

We may instead want to just stop using type at all in the example in the README since it's been deprecated. I'll take a look to update any more places where we're referring to type when using 7.x versions of the stack.

picandocodigo avatar Mar 05 '21 10:03 picandocodigo

@picandocodigo no problem, signed!

dixpac avatar Mar 05 '21 13:03 dixpac

Hi @dixpac Maybe also we need to call IndexerWorker after commit changes to database Cause in postgres with json field I had an issue with that

after_commit { ElasticSearch::IndexerWorker.perform_async((persisted? ? :index : :delete), self.class.to_s, self.id) }

Quicks avatar Nov 12 '21 08:11 Quicks