Wildcard query


(Frances Buontempo) #1

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?


(David Pilato) #2

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:

```
CODE
```

(Frances Buontempo) #3

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


(system) #4

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