I bumped into a situation that when I send a query through http rest, I get result, but when equivalent aggregation send from java api, I can get result back.
So what is the potential problem? Java API library? I stuck on this many days and I don't want to shift code to use WebRequest directly to http REST to get result. I can't upgrade ES to new version currently, have to stay on 1.7.2.
Above code is how I construct query that using java API (official elastic java client) and send it to ES.
What information I missed to provide, please help guide me. many thanks. I do see there are many "doc mapped as nested object" will cause problem during aggregation, but seems in my case, rest api send me correct result.