Specifying multiple preferences

Hi,

Is it possible to specify multiple preferences in an Elasticsearch query? I'm getting an error when using _local and _shard as preferences:

URL: localhost:9200/testindex/_search?preference=_local,_shards:1

{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "no Preference for [_local,_shards]"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "no Preference for [_local,_shards]"
    },
    "status": 400
}

Thanks

Hi!!
Try: GET my-index-000001/_search?preference=_shards:0,1|_local

1 Like

That worked. Thanks!!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.