If I understand it correctly, you want to see all the fields in your index named XXX
, after applying the filter values monitoring
and webApp
.
You don't have to do anything as Elasticsearch by default, returns the _source
(which contains all the values ie fields in your document JSON).
Example:
Index sample docs
{
"name": "foo",
"title": "bar",
"account" : "monitoring",
"app" : "webapp"
}
{
"name": "abc",
"title": "def",
"account" : "observe",
"app" : "webapp"
}
And search query according to your requirement(some filters).
{
"query": {
"bool": {
"filter": [
{
"term": {
"account": "monitoring"
}
},
{
"term": {
"app": "webapp"
}
}
]
}
}
}
And search result
"hits": [
{
"_index": "71614025",
"_id": "1",
"_score": 0.0,
"_source": {
"name": "foo",
"title": "bar",
"account": "monitoring",
"app": "webapp"
}
}
]
Notice all the indexed fields in your search result, under the hits section in the search response.