# Does App search support substring search?

**URL:** https://discuss.elastic.co/t/does-app-search-support-substring-search/312285
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [August 17, 2022, 12:47pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285 "2022-08-17T12:47:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Gerardo\_Zenobi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerardo_zenobi/32/106790_2.png) [@Gerardo\_Zenobi](https://discuss.elastic.co/u/Gerardo_Zenobi)
#### Post date: [August 17, 2022, 12:47pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285/1 "2022-08-17T12:47:52Z")

</div>

Hi there 👋

I wanted to know if App Search supported substring search ? E.g. if a user searches for “note”, this would find records with attributes containing “notepad” or “notebook”, **but it would also match “keynote”**.

For more context:

- [Find strings within strings faster with the Elasticsearch wildcard field | Elastic Blog](https://www.elastic.co/blog/find-strings-within-strings-faster-with-the-new-elasticsearch-wildcard-field)
- [Substring search in Elasticsearch - Hashnode](https://hashnode.com/post/substring-search-in-elasticsearch-ckptk60za0if2bjs1difdhn5l)

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Carlos\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_d/32/126245_2.png) [@Carlos\_D](https://discuss.elastic.co/u/Carlos_D)
#### Post date: [August 17, 2022, 1:02pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285/2 "2022-08-17T13:02:19Z")

</div>

Hi @Gerardo_Zenobi , nice to see you again!

App Search does not support wildcard search. It does, however, support prefix matching as part of App Search [precision tuning](https://www.elastic.co/guide/en/app-search/current/precision-tuning.html).

So, in your example, you would potentially get matches for "notepad" and "notebook" for a "note" query, but you would not find matches for "keynote".

Keep in mind that there are several strategies being done under the hood in Enterprise Search:

- Prefixing
- Stemming (finding word roots, so a query for "jumping" gets results for "jump", "jumps" and "jumping")
- Delimiters removal (so "e-commerce" matches "ecommerce")
- Word joiners (so "FY 2022" would match a document with "FY2022")

These strategies are used depending on the [precision level](https://www.elastic.co/guide/en/app-search/current/search-api-precision.html) for the query.

You can experiment with precision tuning for checking the results obtained for different queries in an Engine.

---

<div class="post-metadata">

### Author: ![Gerardo\_Zenobi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerardo_zenobi/32/106790_2.png) [@Gerardo\_Zenobi](https://discuss.elastic.co/u/Gerardo_Zenobi)
#### Post date: [August 17, 2022, 1:26pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285/3 "2022-08-17T13:26:43Z")

</div>

Hi @Carlos_D, nice to see you too 🙂

I am sorry but I think I didn't understand completely ^^

> For the query " **note**" ... you would not find matches for " **keynote**".

Wouldn't the mentioned strategy `Prefixing` help in this use case?

* * *

In general terms, then, would you say _ **substring**  **search** _ is not supported then?

Thanks again

---

<div class="post-metadata">

### Author: ![Carlos\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_d/32/126245_2.png) [@Carlos\_D](https://discuss.elastic.co/u/Carlos_D)
#### Post date: [August 17, 2022, 2:42pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285/4 "2022-08-17T14:42:53Z")

</div>

> Wouldn't the mentioned strategy `Prefixing` help in this use case?

I'm afraid not. You can think of prefixing as using a wildcard at the end of the query (in this case, "note\*" would not match "keynote").

> In general terms, then, would you say _ **substring**  **search** _ is not supported then?

Substring search is not supported, just prefixing.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 14, 2022, 2:43pm UTC](https://discuss.elastic.co/t/does-app-search-support-substring-search/312285/5 "2022-09-14T14:43:36Z")

</div>

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