Hello there,
I'm using the reindex api endpoint to create a reduced version of an index:
POST /_reindex
{
"size": 10,
"source": {
"index": "big-index",
"_source": ["*"],
"query": {
"match_all": {}
}
},
"dest": {
"index": "small-index"
}
}
Thing is, the documents in the big-index contain some doc value fields which are missing in the small-index.
I am able to see that by running this kind of query:
GET /big-index/_search
{
"query": {
"match_all": {}
},
"docvalue_fields" : ["doc_value_field"]
}
If I run this query against the big index, then the response has a fields section inside hits, but if I run it against the small index there's no such fields section and information can't be filtered by (as opposite as in the big-index).
I have tried to:
- Specify "docvalue_fields" as part of reindex source, it does not complain but data is not there neither.
- Copy the mapping from the original index to the new one be fore reindexing but doesn't work neither.
Am I missing something? Looking around documentation and forums seems like everything should be copied and feel like I'm missing something very basic...
Thanks!
Xavi