- 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 categoriesbug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :R5b9mb:">>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Elasticsearch version: 6.2.4
Plugins installed: []
JVM version: 1.8.0_101
OS version: MacOS (Darwin Kernel Version 15.6.0)
Description of the problem including expected versus actual behavior:
"More Like This" queries do not return any results when "mappings.type._routing" = true.
Steps to reproduce:
PUT test { "mappings": { "type": { "_routing": { "required": true }, "properties": { "myField": { "type": "text" } } } } } POST /_bulk { "index": { "_index": "test", "_type": "type","_id":1, "_routing":1 }} {"myField":"and_foo"} { "index": { "_index": "test", "_type": "type","_id":2, "_routing":2 }} {"myField":"and_foo" } The following query returns no results:
GET /_search { "query": { "more_like_this": { "fields": [ "myField" ], "like": [ { "_index": "test", "_type": "type", "_id": "1" } ], "min_term_freq": 1, "min_doc_freq": 1 } } } If the _routing setting in the index mapping is removed, it correctly returns 1 result.
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categoriesbug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :Ra5q6b:">>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme