# Select tokenizer for search/filter

**URL:** <https://forum.weaviate.io/t/select-tokenizer-for-search-filter/934>\
**Category:** Support\
**Created:** [November 10, 2023, 5:11pm UTC](https://forum.weaviate.io/t/select-tokenizer-for-search-filter/934 "2023-11-10T17:11:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgreg](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mgreg](https://forum.weaviate.io/u/mgreg)\
**Post date:** [November 10, 2023, 5:11pm UTC](https://forum.weaviate.io/t/select-tokenizer-for-search-filter/934/1 "2023-11-10T17:11:23Z")

</div>

I can select a [tokenizer to use during ingest](https://weaviate.io/developers/weaviate/config-refs/schema#property-tokenization) but how can I select a tokenizer for the query during search/filtering?

If I have a keyword like `my_env_var_dont_split` I can use ‘lowercase’ or ‘whitespace’ for tokenization during ingest and the keyword will not be split in the index (as far as I can tell). Please confirm.

But during search/filter it appears that I cannot specify a tokenizer and instead weaviate will [try all tokenization methods](https://github.com/weaviate/weaviate/blob/764935fe4b576c87750d6a16ea20fd6c349b20b8/adapters/repos/db/inverted/bm25_searcher.go#L116) and combine the results.

If the individual words of the keyword are all used in many objects it appears that this is diminishing the search effectiveness.

Is there another way to tell bm25 to only use a specific tokenizer?

---

<div class="post-metadata">

**Author:** ![mgreg](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mgreg](https://forum.weaviate.io/u/mgreg)\
**Post date:** [November 14, 2023, 8:00am UTC](https://forum.weaviate.io/t/select-tokenizer-for-search-filter/934/2 "2023-11-14T08:00:46Z")

</div>

Thanks to @hsm207 for the answer. You don’t have to specify tokenization during search/filtering as the search term is automatically tokenized based on the property’s setting:

> <https://github.com/weaviate/weaviate/blob/6b66e6daa6418c93a9106409788abe1c43c22420/adapters/repos/db/inverted/searcher.go#L521-L532>

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [November 16, 2023, 8:43pm UTC](https://forum.weaviate.io/t/select-tokenizer-for-search-filter/934/3 "2023-11-16T20:43:30Z")

</div>

Hi! Glad you sorted it out.

Thanks for sharing!
