# Suggestion for wildcard field type

**URL:** <https://discuss.elastic.co/t/suggestion-for-wildcard-field-type/280553>\
**Category:** Elasticsearch\
**Created:** [August 5, 2021, 3:51pm UTC](https://discuss.elastic.co/t/suggestion-for-wildcard-field-type/280553 "2021-08-05T15:51:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 5, 2021, 4:11pm UTC](https://discuss.elastic.co/t/suggestion-for-wildcard-field-type/280553/2 "2021-08-05T16:11:23Z")

</div>

Roughly speaking leading infix queries (leading wildcard or ._foo._ regexes) have costs as follows:

1. `keyword` fields are linear with the number of unique terms
2. `wildcard` fields are linear with the number of docs that use a term

So if your URLs e.g. the site home page appear in many docs these are likely to be slow to match.  
The flowchart at the end of [this blog](https://www.elastic.co/blog/find-strings-within-strings-faster-with-the-new-elasticsearch-wildcard-field) has a good decision chart.

---

_[View the full topic](https://discuss.elastic.co/t/suggestion-for-wildcard-field-type/280553)._
