How to get list of preregistered search template by REST api


(Sai Zin Han Hlaing) #1

I registered these search template to Elasticsearch with this query.

POST _search/template/myTemplate
{
    "template": {
        "query": {
            "match": {
                "title": "{{query_string}}"
            }
        }
    }
}

and

POST /_search/template/tweets
{
    "template": {
        "query": {
            "bool": {
                "filter": {
                    "term": {
                        "message": "{{ search_term }}"
                    }
                }
            }
        }
    }
}

The point I would like to know is can we get the list of search template and where that search has been stored ?
Also can we modify those search template or not ?
Please could someone help me ?
Thank you.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.