I am trying to install Graph-Aided Search to integrate Neo4j with ElasticSearch (2.3.1) as shown here. But I'm struggling to define the indexes with curl.
When I try any of the curl commands like this one:
curl -XPUT http://localhost:9200/Person/_settings?index.gas.neo4j.user=neo4j
I get this error message:
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"Person","index":"Person"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"Person","index":"Person"},"status":404}
Let's take for example the Movie database (Movie, Person). How can I define and configure Neo4j
to index Movie
and Person
so I can call them with Elasticsearch
?
UPDATE
When doing for example:
CURL XGET http://localhost:9200/person/_search?pretty=true
I get this result:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
But actually what I am expecting is to return all Person
nodes.
How to tell the person
index of Elasticsearch
to point on Person
nodes in Neo4j
?
These are the settings of person
index:
curl XGET http://localhost:7474/person/_settings?pretty
{
"person" : {
"settings" : {
"index" : {
"gas" : {
"enable" : "false",
"neo4j" : {
"user" : "neo4j",
"hostname" : "http://localhost:7474",
"password" : "neo4j."
}
},
"creation_date" : "1495006378748",
"number_of_shards" : "5",
"number_of_replicas" : "1",
"uuid" : "PuNk1GskRrW5_1BbGGWPiA",
"version" : {
"created" : "2030299"
}
}
}
}
}
Adding the GraphAidedSearch settings to the ES index requires this index to be created, as the error mentioned.
You can do this by issuing the following CURL request :
CURL -XPUT "http://localhost:9200/Person
Using an Elasticsearch extension (plugin) that allow you to enhance search results with graph-based recommendations requires that you have at least a minimum understanding of Elasticsearch itself.
I would highly recommend that you start by learning the basics of Elasticsearch before using any plugin.