How to build task 'elasticsearch:import:model'
Asked Answered
S

1

7

Well, I have elasticsearch-rails gem installed (version 0.1.5) and I can clearly see the task inside the gem files.

But when I run

bundle exec rake environment elasticsearch:import:model CLASS='Comment'

I get this error.

Running rake environment -D doesn't show me the task either.

elasticsearch is running, if I curl http://localhost:9200 it responds me.

Why isn't this working?

Sulla answered 16/9, 2014 at 20:10 Comment(2)
Just to confirm: you've got elasticsearch-rails in your Gemfile and have bundle installed?Darlleen
I do have it. But this thing is just too unstable to use. I managed to import my model manually, but now it returns 0 results.Sulla
L
16

you need create elasticsearch.rake

cat lib/tasks/elasticsearch.rake
require 'elasticsearch/rails/tasks/import'
Lehman answered 6/11, 2014 at 15:58 Comment(1)
yes, i figured that out eventually and forgot to update this. Thank you!Sulla

© 2022 - 2024 — McMap. All rights reserved.