How to hide data from search hits based on some criteria


I want to hide some of data returned by search results like hiding values of arrays fields based on some conditions not filtering records based on that condition.

Is it possible in elasticsearch?


I am not following how is that different from filtering. Maybe provide a few examples?

I have documents in elasticsearch and raised search request with some filter criteria for some of fields and output has field with array values nested objects and I want to display only those values for array nested fields with some condition but if I apply filter with those conditions then i will only get results matching that filter criteria based on array nested field. nested field to display only those ids with some matching values
"Groups": [
"groupType": "Consultant",
"id": "5a2e4b99a6e8d62138303049",
"name": "Test 123456544",
"createdDateTime": "2017-12-11T09:10:22.42Z",
"modifiedDateTime": "2017-12-11T09:10:22.42Z",
"createdBy": {
"id": "592537f5d864c31bc0c1fc73",


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