Wildcard query

I'm trying a wildcard query to match ip addresses.
I have two src_ip documents of starting "5."

This query:

  "query" : {
      "wildcard" : { "src_ip" : "5*"}

returns one hit.

What am I doing wrong?

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:


I can't reproduce this with a small example - and now it is working. No idea what I did. Sorry for noise.

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