elastic
elastic copied to clipboard
Create service for Search Template API
Here's the code to generate a SearchTemplateRequest.
i was looking for some example of how to implement searchTemplate POST using elastic library. Links in this issue are broken. can u link some document where i can search using template.
The latest API specification for 6.x can be found here now.
I guess the latest implemenation for 6.x is this.
i would like to implement this service. I am not sure the best practice so can u guide me how should i go about implementing this service?
Hi,
We use olivere/elastic and are looking at using _search/template. Therefore, we are interested in this feature. We might also be interested in contributing to this with a PR. Where should we look to find information about how to generate the service?
I found in a comment you made in another issue that you used https://github.com/olivere/elastic/tree/generate-api/generator to generate some code from the api spec.
Thank you.
"API Status" marks Search Template as available, this is quite misleading
@foxen It's partly implemented. E.g. you should be able to store, get, and delete a template. What is missing is search and render.
Hi,
We use olivere/elastic and are looking at using
_search/template. Therefore, we are interested in this feature. We might also be interested in contributing to this with a PR. Where should we look to find information about how to generate the service?I found in a comment you made in another issue that you used https://github.com/olivere/elastic/tree/generate-api/generator to generate some code from the api spec.
Thank you.
@jackdbernier Yes, the code generator was a good starting point. Nowadays, as only few services get added between versions, I will mostly simply take an existing service as a blueprint.
For the implementation part, I always use the Java source as the ultimate truth. The ES documentation is very good and useful, but it's written for humans and is often ambiguous and lacks details you can only find in the source code.