Create a custom analyze without tokenizer

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

> {
>   "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?

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

1 Like

It works. Thank you so much.

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