I am very new at elastic.. and i need some help or advice..
i have elastic's json result like this:
And Aggregate like this..
I want to remove aggregate with value "" without removing the result with value ""
So the result will be like this:
here is my query
What should i do ?
Hi @edhbs31 , welcome to the community!
You can't remove the aggregate for "" without also removing the result, as the way to do this would be to use a filter to remove the values and facets you don't need.
Another option would be just to discard the "" value you receive on the facets. Is this an option?
Hi Carlos Thanks for your advice,
unfortunately, there where lot of result that is not "" and also we still need "" result,
We just need to remove "" value in aggregate..
So confused for this case
Are you not able to filter out the facet programatically on your end? It seems doable just comparing the facet value with "" to filter it out.
i'am using go as our backend.
My main use case is just i have to discard value "" only in aggregates, without losing value "" in result..
sorry. I think i'am still little bit confused about it
Carlos is suggesting that once you have received the response from App Search API, you transform the facet values to exclude the empty value entry before returning it back to the client.
Just to double check, are you using App search API or the Elasticsearch APIs?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.