elasticsearch - URI search and highlighting in elasticsearch - elastic - elastic search - elasticsearch tutorial - elasticsearch docker
URI search and highlighting in elasticsearch
A search request can be executed purely using a URI by providing request parameters. Not all search options are exposed when executing a search using this mode, but it can be handy for quick "curl tests".
GET Index/type/_search?q=field:value
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
Another useful feature provided is highlighting the match hits in the documents.
GET /_search
{
"query" : {
"match": { "field": "value" }
},
"highlight" : {
"fields" : {
"content" : {}
}
}
}
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
In the above case, the particular field will be highlighted for each search hit