# Search API doesnt match "33" for "033" in document title

**URL:** https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [April 14, 2021, 8:18am UTC](https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090 "2021-04-14T08:18:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Richard\_Forgacs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_forgacs/32/87027_2.png) [@Richard\_Forgacs](https://discuss.elastic.co/u/Richard_Forgacs)
#### Post date: [April 14, 2021, 8:18am UTC](https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090/1 "2021-04-14T08:18:12Z")

</div>

Hello!

I couldn't figure it out how I can match the title e.g.: "Test title No.033" with query "33".  
When I search for "033", it return the document. But for only "33" it doesnt return ☹

The guide is not very helpful for me ([Search API | Elastic App Search Documentation [8.4] | Elastic](https://www.elastic.co/guide/en/app-search/current/search.html))

Could you please help me with this?

What other information should I provide?

---

<div class="post-metadata">

### Author: ![Irina\_Truong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/irina_truong/32/112040_2.png) [@Irina\_Truong](https://discuss.elastic.co/u/Irina_Truong)
#### Post date: [April 24, 2021, 5:25am UTC](https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090/2 "2021-04-24T05:25:17Z")

</div>

Hi Richard,

AppSearch uses Elasticsearch to store and search for documents. The way Elasticsearch works, it does not scan every field in every document for a substring, because that would be very slow. Instead, it analyzes text when it's indexed, and turns it into a list of tokens. In this case, the list will probably be ["test", "title", "033"] ("no" will be disregarded because it's a "stop word" in English language).

When you search for a string, Elasticsearch will look and see if any of the tokens in your search string match any of the tokens in the document's token list. In this case, "033" matches, but "33" will not.

---

<div class="post-metadata">

### Author: ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)
#### Post date: [April 26, 2021, 2:27pm UTC](https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090/3 "2021-04-26T14:27:48Z")

</div>

I think your best bet to make that work may be to do some pre-processing on your titles before indexing them into App Search. If this is a common pattern you can have your indexing process split `No.033` into `No. 033` and then drop leading 0s so it's `No. 33`, or something to that effect.

---

<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: [May 24, 2021, 2:28pm UTC](https://discuss.elastic.co/t/search-api-doesnt-match-33-for-033-in-document-title/270090/4 "2021-05-24T14:28:26Z")

</div>

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