0

I am trying to do a simple gas-filter query:

{
   "query": {
      "match_all" : {}
   },

       "gas-filter": {
       "name": "SearchResultCypherfilter",
       "query": "MATCH (m:Movie)-[ACTED_IN*1..3]-(p) WHERE m.title =~'.*The Devil.*' RETURN p.uuid as id"
   }
}

But it doesn't work. I am getting this error message:

{
  "error": {
    "root_cause": [
      {
        "type": "search_parse_exception",
        "reason": "failed to parse search source. unknown search element [gas-filter]",
        "line": 4,
        "col": 7
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "1abp502-01-index",
        "node": "KcFzGx6hQDKnfbvB8ZTtuQ",
        "reason": {
          "type": "search_parse_exception",
          "reason": "failed to parse search source. unknown search element [gas-filter]",
          "line": 4,
          "col": 7
        }
      }
    ]
  },
  "status": 400
}

This is weird because I have configured Elasticsearch and Neo4j on a distant computer exactly like on my personal computer. And it is working on my computer. The only difference is that the distant one has proxy. But I assume this is not the problem, because if it was I should be getting another error message, probably something like connection refused.

The only related and similar topic that I found is this one. It says that this error might be because of another instance of elasticsearch running in background. So I tried the solution suggested. Since I am working on Windows the equivalent command to ps aux | grep elasticsearch is TASKLIST /M elasticsearch but that doesn't give me anything. And when I only do tasklist /v or tasklist /svcI cannot find elasticsearch on the list of the processes even when running it.

Any thoughts? Thanks!

[UPDATE]

I followed the documentation of graph-aided-search but still not working. I uninstalled graph-aided-search and installed it again as shown here:

> plugin install com.graphaware.es/graph-aided-search/2.3.2.0 -DproxyHost=host  -DproxyPort=port            
-> Installing com.graphaware.es/graph-aided-search/2.3.2.0...                                                            
Trying https://download.elastic.co/com.graphaware.es/graph-aided-search/graph-aided-search-2.3.2.0.zip ...               
Trying https://search.maven.org/remotecontent?filepath=com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip ...                                                                                                             
Downloading ....................................................................................................................................................................................................................................DONE                                                                                                                         
Verifying https://search.maven.org/remotecontentfilepath=com/graphaware/es/graph-aided-search/2.3.2.0/graph-aided-search-2.3.2.0.zip checksums if available ...                                                                                   
Downloading .DONE                                                                                                        
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                                              
@     WARNING: plugin requires additional permissions     @                                                              
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                                              
* java.lang.RuntimePermission getClassLoader                                                                             
* java.lang.reflect.ReflectPermission suppressAccessChecks                                                               
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html                                      
for descriptions of what these permissions allow and the associated risks.                                               

Continue with installation? [y/N]Y                                                                                        
Installed graph-aided-search into C:\Users\User\Documents\elasticsearch-2.3.2\plugins\graph-aided-search

But still getting the same error of failed to parse search source. unknown search element [gas-filter]. This message says that GAS is not installed in ES 2.3.2. However, graph-aided search was correctly installed, so shouldn't GAS be installed automatically with graph-aided-search?

Could it have anything to do with the Neo4j version? I am working with neo4j-community-3.1.4


[Index settings]

{
  "1abp502-01-index" : {
    "settings" : {
      "index" : {
        "template" : "neo*",
        "number_of_shards" : "5",
        "gas" : {
          "enable" : "true",
          "neo4j" : {
            "hostname" : "http://localhost:7474",
            "password" : "neo4j.",
            "bolt" : {
              "secure" : "false"
            },
            "boltHostname" : "bolt://localhost:7687",
            "user" : "neo4j"
          }
        },
        "creation_date" : "1496148714232",
        "number_of_replicas" : "1",
        "uuid" : "WWMQVEE9SaaFlHk9dUjFIw",
        "version" : {
          "created" : "2030299"
        }
      }
    }
  }
}
Benz
  • 289
  • 4
  • 15

0 Answers0