Мне нужно получить документы, где поле Description
содержит подстроку 28/859
.Вот мой запрос:
{
"explain": true,
"query": {
"bool":{
"filter":{
"bool":{"should":[{"query_string":{"default_field":"Description","query":"28//859",
"analyzer": "keyword"}}]}},
"must_not":{"exists":{"field":"ParentId"}}}
}
}
Я получаю документы с:
28/859
в поле Description
(это нормально) - но ятакже получить документы с помощью
28
в поле Description
(мне это не нужно)
Как получить документы только с подстрокой 28/859
?
Обновление : объяснить пример:
{
"_shard": "[tech_places][4]",
"_node": "u7QI_gjjRXy4-xdqnK2KMw",
"_index": "tech_places",
"_type": "entity",
"_id": "8403",
"_score": 0.0,
"_source": {
"Id": 8403,
"Name": "RETE-43424",
"Description": "SRF-10kv №28 VISO",
"ParentId": null,
"OrganizationId": 12,
"OrganizationPath": "12_27",
"LocationId": 27,
"Classification": "",
"Type": "A",
"Status": 0,
"MaintenanceObjectId": null,
"TreePath": "8403"
},
"_explanation": {
"value": 0.0,
"description": "sum of:",
"details": [
{
"value": 0.0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0.0,
"description": "# clause",
"details": []
},
{
"value": 0.0,
"description": "sum of:",
"details": [
{
"value": 0.0,
"description": "weight(Description:28 in 35112) [], result of:",
"details": [
{
"value": 0.0,
"description": "score(doc=35112,freq=1.0), with freq of:",
"details": [
{
"value": 1.0,
"description": "termFreq=1.0",
"details": []
}
]
}
]
}
]
}
]
}
]
}
},