-
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>bug
Description
Elasticsearch version
6.2.3
Plugins installed: []
X-Pack
JVM version (java -version):
1.8.0_162
Description of the problem including expected versus actual behavior:
Query string query with quote_field_suffix not using the correct field for search. Simple query string query seems to work correctly. Also, this works fine in version 5.6 and 6.0 alpha 2
Steps to reproduce:
PUT testindex
{
"settings": {
"analysis": {
"analyzer": {
"english_exact": {
"tokenizer": "standard",
"filter": [
"lowercase"
]
}
}
},
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"type": {
"properties": {
"body": {
"type": "text",
"analyzer": "english",
"fields": {
"exact": {
"type": "text",
"analyzer": "english_exact"
}
}
}
}
}
}
}
PUT testindex/type/1
{
"body": "Ski resort"
}
PUT testindex/type/2
{
"body": "A pair of skis"
}
PUT testindex/type/3
{
"body": "ski boots"
}
POST testindex/_refresh
GET testindex/_search <-- works fine
{
"query": {
"simple_query_string": {
"fields": [ "body" ],
"quote_field_suffix": ".exact",
"query": "\"ski boot\""
}
}
}
GET testindex/_search
{
"query": {
"query_string": {
"fields": [ "body" ],
"quote_field_suffix": ".exact",
"query": "\"ski boot\""
}
}
}
GET testindex/_validate/query?rewrite
{
"query": {
"query_string": {
"fields": [ "body" ],
"quote_field_suffix": ".exact",
"query": "\"ski boot\""
}
}
}
The result of the rewrite seems to drop the exact multi-field.
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug