# Create a custom analyze without tokenizer

**URL:** <https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045>\
**Category:** Elasticsearch\
**Created:** [March 18, 2020, 8:31am UTC](https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045 "2020-03-18T08:31:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Han](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_han/32/45326_2.png) [@David\_Han](https://discuss.elastic.co/u/David_Han)\
**Post date:** [March 18, 2020, 8:31am UTC](https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045/1 "2020-03-18T08:31:12Z")

</div>

Is it a way to make a new analyzer without tokenizer ?  
As the document say that the tokenizer is necessary. But in my case , I need to analyze the field by " Shingle token filter". I want to use the two words gram by word like shingle token filter. And I can get the two words terms in the Terms Aggregation without one word. I create a new analyzer by

```auto
> {
> "settings": {
> "analysis": {
> "analyzer": {
> "two_words_tokenizer": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": [
> "lowercase",
> "shingle"
> ]
> }
> }
> }
> }
> }

```

And the terms aggregation include the one word result. Can I remove those one word results?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 18, 2020, 3:01pm UTC](https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045/2 "2020-03-18T15:01:57Z")

</div>

How about setting `"output_unigrams":false` in the shingle token filter?

---

<div class="post-metadata">

**Author:** ![David\_Han](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_han/32/45326_2.png) [@David\_Han](https://discuss.elastic.co/u/David_Han)\
**Post date:** [March 26, 2020, 4:03am UTC](https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045/3 "2020-03-26T04:03:40Z")

</div>

It works. Thank you so much.

---

<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:** [April 23, 2020, 4:15am UTC](https://discuss.elastic.co/t/create-a-custom-analyze-without-tokenizer/224045/4 "2020-04-23T04:15:15Z")

</div>

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