Skip to content

Commit

Permalink
Remove match_mapping_type for geo_point fields
Browse files Browse the repository at this point in the history
It also needs to include numeric types because
geo points can be expressed as an array with the format: [lon, lat]
  • Loading branch information
felixbarny committed Feb 13, 2024
1 parent b57cfa5 commit e89bf5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Expand Up @@ -167,8 +167,7 @@
"path_match": [
"location",
"*.location"
],
"match_mapping_type": ["object", "string"]
]
}
},
{
Expand Down
Expand Up @@ -226,7 +226,6 @@ public void testOnlyMatchLeafFields() throws IOException {
fieldsMap.put("foo.user_agent.original.bar", 123);
fieldsMap.put("foo.created.bar", 123);
fieldsMap.put("foo._score.bar", 123);
fieldsMap.put("foo.location", 123);
fieldsMap.put("foo.structured_data", 123);
indexDocument(indexName, fieldsMap);

Expand All @@ -240,7 +239,6 @@ public void testOnlyMatchLeafFields() throws IOException {
assertEquals("long", flatFieldMappings.get("foo.user_agent.original.bar"));
assertEquals("long", flatFieldMappings.get("foo.created.bar"));
assertEquals("float", flatFieldMappings.get("foo._score.bar"));
assertEquals("long", flatFieldMappings.get("foo.location"));
assertEquals("long", flatFieldMappings.get("foo.structured_data"));
}

Expand Down

0 comments on commit e89bf5d

Please sign in to comment.