Search code examples
spring-bootelasticsearchspring-data-elasticsearch

How to addd a custom property spring data elastic search request


Elastic search team added a property "ignore_unmapped": true, used to avoid an error when the index is empty and elastic tries anyway to sort the empty result.

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

How could I add this "ignore_unmapped": true in a spring data elastic search request ? I don't find any example in the documentation.

Thanks in advance.


Solution

  • This is currently not supported. I created an issue to address this.