Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update or allow the indices_put_template to use the new /_index_template API endpoint #1393

Closed
haywoood opened this issue Sep 17, 2020 · 1 comment · Fixed by #1415
Closed
Labels
Milestone

Comments

@haywoood
Copy link

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

I expect the indices_put_template to use the new https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html#put-index-template-api-request-body /_index_template/ API endpoint.

Please describe the actual behavior

The library is routing my request to /_template which is creating 'legacy' index templates

Any steps to reproduce the behavior?

@olivere
Copy link
Owner

olivere commented Oct 16, 2020

Thanks for the hint.

I will have to look up if the APIs/endpoints are really 100% the same compatible. If they're not, I need to create a new service for the new endpoint(s). Otherwise people will use the existing service with 7.x (where x < 8), which has new features that the legacy API doesn't have, then file an issue that it doesn't work.

olivere added a commit that referenced this issue Nov 6, 2020
This commit implements the new Index Template APIs as described in
https://www.elastic.co/guide/en/elasticsearch/reference/7.9/index-templates.html.

They replace the legacy/v1 APIs and were implemented in 7.8.

In general, use `client.IndexXXXIndexTemplate(...)` instead of
`client.IndexXXXTemplate(...)` (with `XXX` being `Get`, `Put`, or
`Delete`) to use the newer versions.

Notice that this commit only implements the new Index Template APIs, not
the Component Template APIs.

Close #1393
olivere added a commit that referenced this issue Nov 6, 2020
This commit implements the new Index Template APIs as described in
https://www.elastic.co/guide/en/elasticsearch/reference/7.9/index-templates.html.

They replace the legacy/v1 APIs and were implemented in 7.8.

In general, use `client.IndexXXXIndexTemplate(...)` instead of
`client.IndexXXXTemplate(...)` (with `XXX` being `Get`, `Put`, or
`Delete`) to use the newer versions.

Notice that this commit only implements the new Index Template APIs, not
the Component Template APIs.

Close #1393
@olivere olivere added this to the 7.0.22 milestone Nov 6, 2020
@olivere olivere modified the milestones: 7.0.22, 7.0.23 Mar 24, 2021
dungnx pushed a commit to dungnx/elastic that referenced this issue Sep 16, 2021
This commit implements the new Index Template APIs as described in
https://www.elastic.co/guide/en/elasticsearch/reference/7.9/index-templates.html.

They replace the legacy/v1 APIs and were implemented in 7.8.

In general, use `client.IndexXXXIndexTemplate(...)` instead of
`client.IndexXXXTemplate(...)` (with `XXX` being `Get`, `Put`, or
`Delete`) to use the newer versions.

Notice that this commit only implements the new Index Template APIs, not
the Component Template APIs.

Close olivere#1393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants