Including and excluding indexes in Elasticsearch query

前端 未结 1 1957
一生所求
一生所求 2021-01-18 14:00

I have the following Elasticsearch query.

GET /index1,index2/type1,type2/_search?q=programming

Let\'s say that I want to exclude inde

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 14:36

    You need to encode the + sign as it is considered space in URL string. See there is space in "resource.id": " index1",

    This will work

    GET /%2Bindex1,-index2/type1,type2/_search?q=programming
    

    Hope this helps!!

    0 讨论(0)
提交回复
热议问题