I am using Neo4j.rb and searchkick for a ruby on rails app.
I have the following class
class NeoUser
include Neo4j::ActiveNode
searchkick
property :first_name, type: String
property :last_name, type: String
property :email, type: String
has_many :out, :neo_users, rel_class: Following
end
In the rails console i do:
NeoUser.reindex
and then :
result = NeoUser.search "*"
I get an empty array back : i.e result.size gives me 0
I do have data in my Neo4j database running on localhost:7000
I have my elasticsearch server up and running on localhost:9200
NeoUser.find_by() does give me correct results, so i am unable to figure out why the searchkick search function fails.
Any ideas?
EDIT :
Output of NeoUser.reindex:
CYPHER 36ms MATCH (n:`NeoUser`) RETURN n ORDER BY n.uuid LIMIT {limit_1000} | {:limit_1000=>1000}
=> true
VERSIONS
neo4j (5.2.9)
neo4j-core (5.1.6)
elasticsearch (1.0.13)
elasticsearch-api (1.0.13)
elasticsearch-transport (1.0.13)
searchkick (0.9.1)
Has it got something to do with the fact that i have installed elasticsearch version 1.7.2 in my ubuntu machine?
EDIT 2 :
I saw that when i create data using the console, the search function is able to return the data.
So i guess searchkick is unable to access my original neo4j database running in my localhost:9200.
but NeoUser.all does return all my data nodes, so how do i tell searchkick to use that specific database, or is there some other issue?