Any suggestions on how to achieve it through the JSON query? Please remember, there could be more than one entity. In such cases it should be limited to [{"entity 1"}, {"entity 2"}...]
Thanks David, your suggestion improved the result by minimizing what goes to client. This helps us control the cost for network use. Apps deployed in the cloud do incur a fee for network traffic.
We use a Java REST client to execute queries and changed the endpoint as below
TBH I don't think that elasticsearch should be accessible on internet.
I always think elasticsearch as a backend component. Which means to me that you should have a frontend, close to the backend.
The frontend layer can rewrite whatever response to whatever format you wish.
I don't think that we (elastic) will do more simplification than response filtering we already have.
Our instances of ES are insulated from the internet. A set of Java REST clients on application server(s) interact with ES.
Our application is secure and doesn't reveal any details about its data source. Only it can access the servers that run ES. In a nutshell our architecture is:
[Internet Client] <---> [[App Server]] <---> {ES]
Moving JSON between the client & server and server & ES is what we want to minimize.
I think cloud vendors charge for the network traffic in some fashion. For example the attached screen clip is from the price calculator from a major vendor. The cost/month differs when you change the Network Traffic Processed. Besides the cost, I believe data size also affects the efficiency, a factor I didn't mention in my earlier communication.
Normally if you have the backend and the frontend within the same "project" (whatever it's called on your cloud platform), then you don't pay anything for it AFAIK but I might be wrong.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.