# Bigram field

**URL:** <https://discuss.elastic.co/t/bigram-field/17189>\
**Category:** Elasticsearch\
**Created:** [April 25, 2014, 4:21am UTC](https://discuss.elastic.co/t/bigram-field/17189 "2014-04-25T04:21:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igal/32/1119_2.png) [@Igal](https://discuss.elastic.co/u/Igal)\
**Post date:** [April 25, 2014, 4:21am UTC](https://discuss.elastic.co/t/bigram-field/17189/1 "2014-04-25T04:21:01Z")

</div>

I'm trying to add a bigram field for use as described at  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html)

I defined a bigram tokenizer like so:

"bigram\_tokenizer": {

```
  "type" : "nGram"
 ,"min_gram" : 2
 ,"max_gram" : 2
 ,"token_chars": ["letter", "digit"]

```

}

and a bigram analyzer like so:

"bigram\_analyzer" : {

```
  "type" : "custom"
 ,"char_filter" : ["html_strip"]
 ,"tokenizer" : "bigram_tokenizer"
 ,"filter" : [

      "lowercase"
     ,"asciifolding"
 ]

```

}

then I'm trying to add a field in the mapping, like so:

```
 "bigram" : { "type": "text", "analyzer": "bigram_analyzer" }

```

but this fails.

any ideas?

thanks!

--  
Igal Sapir  
Railo Core Developer  
[http://getRailo.org/](http://getRailo.org/)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5359E2AD.2060400%40getrailo.org](https://groups.google.com/d/msgid/elasticsearch/5359E2AD.2060400%40getrailo.org).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Igal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igal/32/1119_2.png) [@Igal](https://discuss.elastic.co/u/Igal)\
**Post date:** [April 25, 2014, 5:01am UTC](https://discuss.elastic.co/t/bigram-field/17189/2 "2014-04-25T05:01:03Z")

</div>

the error I'm getting is:

```
 MapperParsingException[No handler for type [text] declared on field 

```

[bigram];

On 4/24/2014 9:21 PM, Igal @ [getRailo.org](http://getRailo.org) wrote:

> I'm trying to add a bigram field for use as described at  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html)
> 
> I defined a bigram tokenizer like so:
> 
> "bigram\_tokenizer": {
> 
> ```
> "type" : "nGram"
> ,"min_gram" : 2
> ,"max_gram" : 2
> ,"token_chars": ["letter", "digit"]
> 
> ```
> 
> }
> 
> and a bigram analyzer like so:
> 
> "bigram\_analyzer" : {
> 
> ```
> "type" : "custom"
> ,"char_filter" : ["html_strip"]
> ,"tokenizer" : "bigram_tokenizer"
> ,"filter" : [
> 
> "lowercase"
> ,"asciifolding"
> ]
> 
> ```
> 
> }
> 
> then I'm trying to add a field in the mapping, like so:
> 
> ```
> "bigram" : { "type": "text", "analyzer": "bigram_analyzer" }
> 
> ```
> 
> but this fails.
> 
> any ideas?
> 
> thanks!

--  
Igal Sapir  
Railo Core Developer

> **[Top 10 Best Bitcoin Slots Sites | Best Online Casino 2023](https://www.getrailo.org/)**
>
> Compare the Best Bitcoin Slots Sites now at getrailo.org. Slots represent some of the most popular and exciting online casino offerings.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5359EC0F.8030701%40getrailo.org](https://groups.google.com/d/msgid/elasticsearch/5359EC0F.8030701%40getrailo.org).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Igal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igal/32/1119_2.png) [@Igal](https://discuss.elastic.co/u/Igal)\
**Post date:** [April 25, 2014, 5:02am UTC](https://discuss.elastic.co/t/bigram-field/17189/3 "2014-04-25T05:02:16Z")

</div>

ouch... scratch that. I used "text" instead of "string". need some  
sleep I guess...

On 4/24/2014 10:01 PM, Igal @ [getRailo.org](http://getRailo.org) wrote:

> the error I'm getting is:
> 
> ```
> MapperParsingException[No handler for type [text] declared on 
> 
> ```
> 
> field [bigram];
> 
> On 4/24/2014 9:21 PM, Igal @ [getRailo.org](http://getRailo.org) wrote:
> 
> > I'm trying to add a bigram field for use as described at  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html)
> > 
> > I defined a bigram tokenizer like so:
> > 
> > "bigram\_tokenizer": {
> > 
> > ```
> > "type" : "nGram"
> > ,"min_gram" : 2
> > ,"max_gram" : 2
> > ,"token_chars": ["letter", "digit"]
> > 
> > ```
> > 
> > }
> > 
> > and a bigram analyzer like so:
> > 
> > "bigram\_analyzer" : {
> > 
> > ```
> > "type" : "custom"
> > ,"char_filter" : ["html_strip"]
> > ,"tokenizer" : "bigram_tokenizer"
> > ,"filter" : [
> > 
> > "lowercase"
> > ,"asciifolding"
> > ]
> > 
> > ```
> > 
> > }
> > 
> > then I'm trying to add a field in the mapping, like so:
> > 
> > ```
> > "bigram" : { "type": "text", "analyzer": "bigram_analyzer" }
> > 
> > ```
> > 
> > but this fails.
> > 
> > any ideas?
> > 
> > thanks!

--  
Igal Sapir  
Railo Core Developer

> **[Top 10 Best Bitcoin Slots Sites | Best Online Casino 2023](https://www.getrailo.org/)**
>
> Compare the Best Bitcoin Slots Sites now at getrailo.org. Slots represent some of the most popular and exciting online casino offerings.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5359EC58.2020802%40getrailo.org](https://groups.google.com/d/msgid/elasticsearch/5359EC58.2020802%40getrailo.org).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:33am UTC](https://discuss.elastic.co/t/bigram-field/17189/4 "2017-07-06T01:33:37Z")

</div>


