Lucene抽象方法在Elasticsearch 2.2.0中执行multiisearch时出错

时间:2016-02-26 21:08:00

标签: elasticsearch lucene

查询是两个字---> "word1""\"another word\""。我向MultiSearchRequestBuilder添加了两个多搜索查询,然后执行查询,但我得到了这个回复:

{
  "responses" : [ {
    "took" : 22,
    "timed_out" : false,
    "_shards" : {
      "total" : 6,
      "successful" : 4,
      "failed" : 2,
      "failures" : [ {
        "shard" : 2,
        "index" : "elasticsearch.test",
        "node" : "99LdzvW_T0aBY4UOzNHAIA",
        "reason" : {
          "type" : "abstract_method_error",
          "reason" : "org.apache.lucene.search.TwoPhaseIterator.matchCost()F"
        }
      } ]
    },
    "hits" : {
      "total" : 0,
      "max_score" : null,
      "hits" : [ ]
    }
  }, {
    "took" : 18,
    "timed_out" : false,
    "_shards" : {
      "total" : 6,
      "successful" : 5,
      "failed" : 1,
      "failures" : [ {
        "shard" : 2,
        "index" : "elasticsearch.test",
        "node" : "rdK2996KQz-H0khDgW7mKg",
        "reason" : {
          "type" : "abstract_method_error",
          "reason" : "org.apache.lucene.search.TwoPhaseIterator.matchCost()F"
        }
      } ]
    },
    "hits" : {
      "total" : 0,
      "max_score" : null,
      "hits" : [ ]
    }
  } ]
}

问题是它适用于ES 2.1.1但不适用于ES 2.2.0 !!

这里有什么问题?

1 个答案:

答案 0 :(得分:1)

Lucene 5.4中已在此问题中添加了

TwoPhaseIterator.matchCostLUCENE-6276

  • ElasticSearch 2.1使用Lucene 5.3.x
  • ElasticSearch 2.2使用Lucene 5.4.x

您的测试中可能存在对Lucene的错误依赖,版本< 5.4