Hello guys, I'm starting using Elasticsearch and I would like to know some things before I deep dive in it.
-
Is it possible to query two different indexes, and aggregate the data matching a specific date?
-
If the date format contains the date and the time, can I aggregate it by hour for example?
I know both solutions can be done on mongoDB using aggregations, but I want to start using ES.
Indexes:
holdings: [{
name: "xpto",
quantity: 5,
date: "2018-05-20 23:30:00"
}, {...}]
prices: [{
name: "xpto",
price: 10000,
date: "2018-05-20 23:10:00"
}, {...}]
I spect an output like that:
total_value: [{
name: "xpto",
value: 50000,
date: "2018-05-20 23:00:00"
}, {...}]
Note: I aggregate the data based on the hour.