Ends with operator in elastic search

(Ravi) #1

I'm using elastic search 5.6

is there an ends with operator ?
is wildcard:"*suffix" the only option to search for a field ending with suffix ?


What's wrong with "*suffix$" ?

(Russ Cam) #3

If frequently searching for text that "ends with", you might want to consider using a custom analyzer that

  1. Reverses tokens using reverse token filter
  2. Use edgengram token filter to generate reversed prefixes
  3. Reverse prefixes to get suffixes using reverse token filter

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.