未知的搜索元素气体过滤器

时间:2017-06-14 13:10:55

标签: elasticsearch neo4j cypher graphaware

我正在尝试进行简单的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

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

有什么想法? 谢谢!

[UPDATE]

我按照graph-aided-search的文档进行操作,但仍无效。我卸载了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"
        }
      }
    }
  }
}

0 个答案:

没有答案