Suffix query #
Returns documents that contain terms ending in the provided value.
This is the mirror of the
prefix query; like a leading
wildcard, it is more expensive than a prefix match.
Inside a
nestedquery: not supported yet — the clause is rejected with an HTTP 400 naming the offending clause.
Examples #
POST /my-collection/_search
{
"query": {
"suffix": {
"field": "url.path",
"value": ".jpg"
}
}
}
Parameters for suffix
#
<field>
(Required, string) Field you wish to search.value
(Required, string) The suffix terms must end with.case_insensitive
(Optional, boolean, default:false) ASCII case-insensitive matching of the value with the indexed field values.boost
(Optional, float, default:1.0) Decrease or increase the relevance scores of the query.rewrite
(Optional, string) Method used to rewrite the query (constant_score,scoring_boolean, …).