Hello dear community.
I have been looking for information for a very long time.
I need to make mapping from search for every 2nd element. For example, I have "size": 1000, while I want to get every second element as a result (with a gap of one), in result 500 elements.
For example, now the output is:
/coin_charts/testcoin1/_search?filter_path=hits.hits._source
{
"hits": {
"hits": [
{
"_source": {
"time": 1356991200000,
"priceUsd": 5
}
},
{
"_source": {
"time": 1356991500000,
"priceUsd": 10
}
},
{
"_source": {
"time": 1356991800000,
"priceUsd": 6
}
},
...
]
}
}
And i want to get this:
{
"hits": {
"hits": [
{
"_source": {
"time": 1356991200000,
"priceUsd": 5
}
},
{
"_source": {
"time": 1356991800000,
"priceUsd": 6
}
},
...
]
}
}
Can you please tell me how to implement this?