"query" : {
"regexp":{
"my field": "wild nature"
}
}
Why do you want a "regexp" query for this and not simply user "match_phrase"?
Hi @cbuescher,
when i query for "wild" against my field i dont want "wild nature".
You could make your field "not_analyzed" then. Just pointing out these options because regex is way slower than these kind of phrase matches.
Is there any possibilities for exact match(not match, match_phrase or match_phrase_prefix)?
Yes, use the keyword analyzer or "index" : "not_analyzed"
in the field mappings.
No, you need to reindex or use "match_phrase". But that problem also isn't solved by using "regex".