Given mapping:
{
"mappings": {
"properties": {
"user_ids": {"type": "integer"}
}
}
}
Observations:
- Index
{"user_ids": 1}, and data will show up correctly
- Index
{"user_ids": "x"}, and error is thrown failed to parse field [user_ids] of type [integer] in document, indicating that mapping is working correctly
- However, indexing
{"user_ids": [1]} just clears the field, without throwing error.
Question:
- Why does this happen and how can I index arrays of integers?
Extra:
- I removed all
settings config, doesn't change anything
- I tried
keyword type, doesn't change anything
- If relevant, I use latest opensearch-py