How to Add Previously Stored Data in Elasticsearch index

105 views Asked by At

hope you are fine!

I have implement elasticsearch Locally & also in production on Heroku but I face a problem on Heroku that when I create an index by

curl -XPUT https://your:[email protected]/blogs-blogs

I can search from the records which are newly added after making the index but not able to search from the records which I save before this index.

1

There are 1 answers

0
Humayun Naseer On BEST ANSWER

If you want to import your models in elasticsearch you can easily done by the following line

heroku run bundle exec rake environment elasticsearch:import:model CLASS='Post' FORCE=true

But make sure your Bonsai and other Es gems should be compatible with elasticsearch.