1

我想在 Elastic4s 中实现以下查询。在荧光笔中看不到任何实现matched_fields子句的方法。有什么帮助吗?

{
  "query": {
    "multi_match": {
      "type": "most_fields",
      "query": "hello world",
      "fields": [ "text", "text.human" ]
    }
  },
  "highlight": {
    "order": "score",
    "fields": {
      "text": {
        "matched_fields": [ "text", "text.human" ],
        "fragment_size": 100,
        "number_of_fragments": 10
      }
    }
  }
}
4

1 回答 1

1

一个答案非常简单的问题。你还不能在 elastic4s 中做到这一点:)

所以,我刚刚添加了它: https ://github.com/sksamuel/elastic4s/commit/3f8a4e47ae603b7a3263bc3d31c27f2b6706cd8e

这将在下一个 1.5.x 版本和 1.6.0 中。

于 2015-06-14T19:43:25.407 回答