0

我正在尝试做一个简单的gas-filter查询:

{
   "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"
   }
}

但它不起作用。我收到此错误消息:

{
  "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
}

这很奇怪,因为我已经在远程计算机上进行了配置ElasticsearchNeo4j就像在我的个人计算机上一样。它正在我的电脑上运行。唯一的区别是远方有代理。但我认为这不是问题,因为如果是我应该收到另一条错误消息,可能类似于connection refused.

我发现的唯一相关和相似的主题是这个。它说这个错误可能是因为另一个elasticsearch在后台运行的实例。所以我尝试了建议的解决方案。因为我在 Windows 上工作,所以等效的命令ps aux | grep elasticsearchTASKLIST /M elasticsearch,但这并没有给我任何东西。当我只做tasklist /v或即使在运行它时tasklist /svc也无法在进程列表中找到它时。elasticsearch

有什么想法吗?谢谢!

[更新]

我遵循了图形辅助搜索的文档,但仍然无法正常工作。我卸载graph-aided-search并再次安装它,如下所示:

> 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

但仍然得到相同的错误failed to parse search source. unknown search element [gas-filter]。此消息说GAS未安装在ES 2.3.2. 但是,graph-aided search已正确安装,所以不GAS应该自动安装graph-aided-search?

会不会跟Neo4j版本有关系?我正在与neo4j-community-3.1.4


[索引设置]

{
  "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"
        }
      }
    }
  }
}
4

0 回答 0