# Building a custom tokenizer: "Could not find suitable constructor"

**URL:** <https://discuss.elastic.co/t/building-a-custom-tokenizer-could-not-find-suitable-constructor/101138>\
**Category:** Elasticsearch\
**Created:** [September 20, 2017, 9:11am UTC](https://discuss.elastic.co/t/building-a-custom-tokenizer-could-not-find-suitable-constructor/101138 "2017-09-20T09:11:45Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 22, 2017, 3:45pm UTC](https://discuss.elastic.co/t/building-a-custom-tokenizer-could-not-find-suitable-constructor/101138/8 "2017-09-22T15:45:29Z")

</div>

A shot in the dark, but are you sure that the IndexSettingsService is used  
in the constructor? Try using the index settings directly (which should be  
injected):

public UrlTokenizerFactory(Index index, @IndexSettings Settings  
indexSettings, @Assisted String name, @Assisted Settings settings)

---

_[View the full topic](https://discuss.elastic.co/t/building-a-custom-tokenizer-could-not-find-suitable-constructor/101138)._
