# Which analyzer(s) / tokenizer(s) for specific ID?

**URL:** <https://discourse.hibernate.org/t/which-analyzer-s-tokenizer-s-for-specific-id/5459>\
**Category:** Hibernate Search\
**Created:** [June 21, 2021, 9:23am UTC](https://discourse.hibernate.org/t/which-analyzer-s-tokenizer-s-for-specific-id/5459 "2021-06-21T09:23:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [June 21, 2021, 12:25pm UTC](https://discourse.hibernate.org/t/which-analyzer-s-tokenizer-s-for-specific-id/5459/2 "2021-06-21T12:25:15Z")

</div>

Hello,

So essentially you simply want case-insensitive prefix search?

What was wrong with [my answer to your previous, similar question](https://discourse.hibernate.org/t/autocomplete-with-hibernate-search-6/5006/4)?

It should work similarly for an ID field. You will just have to declare new analyzers where you remove unnecessary analysis components, such as the tokenizer (replace it with a `KeywordTokenizer`) and the `SnowballPorterFilterFactory` (remove it, you don’t need it for IDs).

Alternatively, you can use a `@KeywordField` with a simple “lowercasing” normalizer (similar to the one named `lowercase` in [this example](https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#backend-lucene-analysis-analyzers)), and rely on a [wildcard predicate](https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#search-dsl-predicate-wildcard). It’s less flexible, but should work for simple use cases.

---

_[View the full topic](https://discourse.hibernate.org/t/which-analyzer-s-tokenizer-s-for-specific-id/5459)._
