Skip to content

search: added the feature to use a stored template at search time. #973

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

Conversation

ehsangolshani
Copy link

sometimes there is a need to a stored template when we use search method, especially when our query is very large, it's a good practice to store the query in Elasticsearch first, then use the search method in client with template_id and some parameters to pass it.
link to elasticsearch feature: Search Template

@olivere
Copy link
Owner

olivere commented Nov 25, 2018

Thanks for your support.

The client uses the REST API specification and the Java source as the primary sources of information for the client. While I see that the documentation has the "id" parameter, neither the Search Template API nor the Search API mentions this field. The Render Search Template API mentioned this field, however.

I'm afraid I have to check what's going on here first before adding incompatible or deprecated features to the client.

@ehsangolshani
Copy link
Author

neither the Search Template API nor the Search API mentions this field. The Render Search Template API mentioned this field, however.

Thank you

I looked at these links. It seems the java client doesn't support this functionality. however, it is an important and common used feature, especially when the network usage is important for the user of the client.

@olivere
Copy link
Owner

olivere commented Nov 28, 2018

I looked this up in the Java code and official clients. The Search Template API is a separate API from the Search API. I created issue #977 to track this.

@olivere olivere closed this Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants