Wildcard in a match_phrase query

Hi

I am trying to do a wildcard query on a field as below,
{"clientPort":{"query":"*"}}, my intention is for the query to bring any/all values associated with clientPort, is this possible ? currently i dont get anything with *

Full query below

"{"search_type":"query_then_fetch","ignore_unavailable":true,"index":"granular_smtp"} {"size":0,"query":{"bool":{"filter":[{"range":{"ts":{"gte":"1593138953932","lte":"1593142553932","format":"epoch_millis"}}},{"query_string":{"analyze_wildcard":true,"query":""}}],"must":[{"match_phrase":{"clientIp":{"query":"75.211.55.138"}}},{"match_phrase":{"serverPort":{"query":"25"}}},{"match_phrase":{"clientPort":{"query":""}}}]}},"aggs":{"2":{"date_histogram":{"interval":"1d","field":"ts","min_doc_count":0,"extended_bounds":{"min":"1593138953932","max":"1593142553932"},"format":"epoch_millis"},"aggs":{"1":{"avg":{"field":"responseTime"}}}}}} "

Welcome!

Could you indent your code so it's easier to read it?

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Please update your post.

sorry i am new here, i dont seem to find a way to edit the original post to make changes, Could you please suggest how to edit the post

I think you should see this button at the bottom.

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