Current elastic mapping:
"properties": {
"content": {
"type": "text",
"term_vector":"with_positions_offsets",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"analyzer": "russian"
}
}
Field "content" contains results of site crawling, exactly pages "body" tag content, stripped off from tags. Task is to realize three types of search for this field. 1. All specified words 2. Any of the specified words 3. Exactly in the text
For 1 case - match_phrase For 2 case - match For 3 case - there must be match_phrase without analizing, becouse with "russian" analizer it finds this phraze with different endings and declensions
Tried this query with no luck:
"query": {
"bool": {
"must": [
{
"match_phrase": {
"content": {
"query": "some search phraze",
"analyzer": "keyword"
}
}
}
]
}