Elasticsearch
Table of contents
List indices
GET /_cat/indices?v
Search with highlights
In order for the highlight field to return all the data in the target field, set the number_of_fragments
option to 0
. For example:
GET /idx/_search
{
"size": 1,
"_source": ["field1", "field2", "field3","field4"],
"query": {
"regexp": {
"field1": ".*whatever.*"
}
},
"highlight": {
"fields": {
"field1": {"number_of_fragments" : 0}
}
},
"sort": [
{
"field4": {
"order": "desc"
}
}
]
}