-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bugTeam:SearchMeta label for search teamMeta label for search team
Description
Mapping:
{
"mappings": {
"properties": {
"text_field": {
"type": "text",
"fields": {
"integer_subfield": {
"type": "integer"
}
}
},
"integer_field": {
"type": "integer"
}
}
}
}
Test data:
{"index":{}}
{"text_field": "-1914753919", "integer_field": "-1914753919"}
{"index":{}}
{"text_field": 1914753919, "integer_field": 1914753919}
{"index":{}}
{"text_field": "1914753919", "integer_field": "1914753919"}
The output of text_field.integer_subfield should be a number, just like the output of integer_field, instead it's being returned as a String:
"hits": [
{
"_index": "test",
"_id": "DtoI43MBMAxUDNMNyqcY",
"_score": 1,
"fields": {
"text_field.integer_subfield": [
"-1914753919"
],
"integer_field": [
-1914753919
],
"text_field": [
"-1914753919"
]
}
},
{
"_index": "test",
"_id": "D9oI43MBMAxUDNMNyqcZ",
"_score": 1,
"fields": {
"text_field.integer_subfield": [
"1914753919"
],
"integer_field": [
1914753919
],
"text_field": [
"1914753919"
]
}
},
{
"_index": "test",
"_id": "ENoI43MBMAxUDNMNyqcZ",
"_score": 1,
"fields": {
"text_field.integer_subfield": [
"1914753919"
],
"integer_field": [
1914753919
],
"text_field": [
"1914753919"
]
}
}
]
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bugTeam:SearchMeta label for search teamMeta label for search team