Closed RaphaelL2e closed 2 years ago
The API you need is IndicesGetAliases
. Here's a lot of code on how to work with that API. The FilterPath
method is on the service here.
HTH.
but i think IndicesGetAliases only return
indexMap := make(map[string]struct {
Aliases map[string]struct {
IsWriteIndex bool `json:"is_write_index"`
} `json:"aliases"`
})
dont have my want filter body
That's what IndicesGetAliases returns IIRC. What API is that GET alias_xxx/_alias
endpoint? Can you refer me to the documentation page on elastic.co?
So the API is correct (the indices_get_aliases.go
implements the endpoint you want). But you're missing part of the response?
yes
Unfortunately, as the response is dynamic, all you can do is to use e.g. the PerformRequest
method on the Client
then and parse the body on your side.
ok,thx
Please use the following questions as a guideline to help me answer your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
[x ] elastic.v7 (for Elasticsearch 7.x) [ ] elastic.v6 (for Elasticsearch 6.x) [ ] elastic.v5 (for Elasticsearch 5.x) [ ] elastic.v3 (for Elasticsearch 2.x) [ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
GET alias_xxx/_alias?filter_path=index_name.aliases.alias_xxx
but may cant use olivere implement
Please describe the actual behavior
i want result this filter
Any steps to reproduce the behavior?