【问题标题】:How to addd a custom property spring data elastic search request如何添加自定义属性spring数据elasticsearch请求
【发布时间】:2021-10-25 09:56:31
【问题描述】:

Elastic 搜索团队添加了一个属性"ignore_unmapped": true,用于避免索引为空时出错,并且 elastic 无论如何都会尝试对空结果进行排序。

{
    "from": 0,
    "size": "15",
    "sort": {
        "title": {
            "order": "asc",
            "ignore_unmapped": true
        }
    }
}

如何在 Spring Data 弹性搜索请求中添加此 "ignore_unmapped": true ?我在文档中找不到任何示例。

提前致谢。

【问题讨论】:

    标签: spring-boot elasticsearch spring-data-elasticsearch


    【解决方案1】:

    目前不支持此功能。我创建了an issue 来解决这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-26
      • 2016-03-18
      • 2018-10-11
      • 2014-10-27
      • 2012-07-10
      • 2013-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多