graph-aided-search-demo
graph-aided-search-demo copied to clipboard
Can't find csv file
Hi:
I am following the README but when it gets to the point to import the movie data files:-
USING PERIODIC COMMIT 500 LOAD CSV FROM "file:///u.user" AS line FIELDTERMINATOR '|' CREATE (:User {objectId: toInt(line[0]), age: toInt(line[1]), gender: line[2], occupation: line[3]});
I get "Couldn't load the external resource at: file:/data/import/u.user" and there are no files present in the the neo4j container at "/data/import". Which files are you referring to?
Thanks
I found the requisite dataset and the simple elasticsearch query works fine. However, when I try and do the graph search enabled demo, I get:-
{ "error": { "root_cause": [ { "type": "runtime_exception", "reason": "Failed to parse a search response." } ], "type": "runtime_exception", "reason": "Failed to parse a search response.", "caused_by": { "type": "client_handler_exception", "reason": "java.net.ConnectException: Connection refused (Connection refused)", "caused_by": { "type": "connect_exception", "reason": "Connection refused (Connection refused)" } } }, "status": 500 }
@nundys can you please let me know where did you find the requisite dataset?
Never mind! The files can be downloaded from the link here: https://graphaware.com/neo4j/2016/04/20/graph-aided-search-the-rise-of-personalised-content.html
@tkanchin are the queries working?
curl -X POST http://localhost:9200/neo4j-index/Movie/_search -d '{ "query" : { "bool": { "should": [{"match": {"title": "love"}}] } }, "gas-filter" :{ "name": "SearchResultCypherFilter", "query": "MATCH (n:User)-[r:LIKES]->(m) WITH m, avg(r.rate) as avg_rate where avg_rate < 3 RETURN m.objectId as id", "exclude": true, "keyProperty": "objectId" } }'
i used this one but my output is
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
output of 'curl -X GET "localhost:9200/_cat/indices?v"' is
yellow open neo4j-index 5 1 0 0 795b 795b
i don't think docs are getting built
The same problem here, simple query is working, but with gas filter there is an error:
{ "query" : { "bool": { "should": [{"match": {"title": "love"}}] } }, "gas-filter" :{ "name": "SearchResultCypherFilter", "query": "MATCH (n:User)-[r:LIKES]->(m) WITH m, avg(r.rate) as avg_rate where avg_rate < 3 RETURN m.objectId as id", "exclude": true, "keyProperty": "objectId" } }
{ "error": { "root_cause": [ { "type": "runtime_exception", "reason": "Failed to parse a search response." } ], "type": "runtime_exception", "reason": "Failed to parse a search response.", "caused_by": { "type": "client_handler_exception", "reason": "java.net.ConnectException: Connection refused (Connection refused)", "caused_by": { "type": "connect_exception", "reason": "Connection refused (Connection refused)" } } }, "status": 500 }
Any suggestions pls ?