# Help mapping in elasticsearch for searching content

**URL:** <https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220>\
**Category:** Elasticsearch\
**Created:** [April 14, 2015, 1:49am UTC](https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220 "2015-04-14T01:49:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jin\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jin_nguyen/32/781_2.png) [@Jin\_Nguyen](https://discuss.elastic.co/u/Jin_Nguyen)\
**Post date:** [April 14, 2015, 1:49am UTC](https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220/1 "2015-04-14T01:49:34Z")

</div>

Hi all,

I setup an elasticsearch to search for my website and need to mapping some  
settings to index, this my settings config:

"settings": {  
"analysis": {  
"analyzer": {  
"my\_analyzer": {  
"type": "custom",  
"tokenizer": "whitespace",  
"filter": ["my\_stop\_word", "my\_lowercase", "my\_ascii\_folding"]  
}  
},  
"filter" : {  
"my\_stop\_word": {  
"type": "stop",  
"stopwords": "_english_"  
},  
"my\_lowercase": {  
"type": "lowercase"  
},  
"my\_ascii\_folding": {  
"type": "asciifolding"  
}  
}  
}  
}

This is mapping of index:

"properties" : {  
"actors" : {  
"type" : "string",  
"fields" : {  
"actors" : {  
"type" : "string",  
"omit\_norms" : "true",  
"index\_options" : "docs"  
},  
"my\_analyzer\_ngram" : {  
"type" : "string",  
"analyzer" : "my\_analyzer",  
"include\_in\_all" : "false"  
}  
}  
},  
....

It search ok, but do not action something like google when I type something  
wrong, google will remind "Did you mean that?". Example:

If I type "King of thrones" to search with my db, of course db doesn't has  
any film named it like this, I expect that search engine will give a clue  
"Game of thrones" for user. That's mean if user search do not exactly, my  
website still can give a true result for them.

Thanks in advanced

--  
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/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![softwaredoug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/softwaredoug/32/22681_2.png) [@softwaredoug](https://discuss.elastic.co/u/softwaredoug)\
**Post date:** [April 14, 2015, 2:16am UTC](https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220/2 "2015-04-14T02:16:55Z")

</div>

Hello Jin

I don't see here how you're searching, but there's nothing in the default  
searches that provides this functionality. You want to look into  
Elasticsearch's suggestiers feature

> **[Suggesters | Elasticsearch Guide \[1.5\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-suggesters.html)**

-Doug

On Mon, Apr 13, 2015 at 9:49 PM, Jin Nguyen [jindov@gmail.com](mailto:jindov@gmail.com) wrote:

> Hi all,
> 
> I setup an elasticsearch to search for my website and need to mapping some  
> settings to index, this my settings config:
> 
> "settings": {  
> "analysis": {  
> "analyzer": {  
> "my\_analyzer": {  
> "type": "custom",  
> "tokenizer": "whitespace",  
> "filter": ["my\_stop\_word", "my\_lowercase", "my\_ascii\_folding"]  
> }  
> },  
> "filter" : {  
> "my\_stop\_word": {  
> "type": "stop",  
> "stopwords": "_english_"  
> },  
> "my\_lowercase": {  
> "type": "lowercase"  
> },  
> "my\_ascii\_folding": {  
> "type": "asciifolding"  
> }  
> }  
> }  
> }
> 
> This is mapping of index:
> 
> "properties" : {  
> "actors" : {  
> "type" : "string",  
> "fields" : {  
> "actors" : {  
> "type" : "string",  
> "omit\_norms" : "true",  
> "index\_options" : "docs"  
> },  
> "my\_analyzer\_ngram" : {  
> "type" : "string",  
> "analyzer" : "my\_analyzer",  
> "include\_in\_all" : "false"  
> }  
> }  
> },  
> ....
> 
> It search ok, but do not action something like google when I type  
> something wrong, google will remind "Did you mean that?". Example:
> 
> If I type "King of thrones" to search with my db, of course db doesn't has  
> any film named it like this, I expect that search engine will give a clue  
> "Game of thrones" for user. That's mean if user search do not exactly, my  
> website still can give a true result for them.
> 
> Thanks in advanced
> 
> --  
> 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/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
\*Doug Turnbull \*\*| \*Search Relevance Consultant | OpenSource Connections,  
LLC | 240.476.9983 | [http://www.opensourceconnections.com](http://www.opensourceconnections.com)  
Author: Taming Search [http://manning.com/turnbull](http://manning.com/turnbull) from Manning  
Publications  
This e-mail and all contents, including attachments, is considered to be  
Company Confidential unless explicitly stated otherwise, regardless  
of whether attachments are marked as such.

--  
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/CALG6HL8vZjMtkGAt%2BD8WROMdF-uv5a7Q7kx\_sB9bx22zDRrJcg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALG6HL8vZjMtkGAt%2BD8WROMdF-uv5a7Q7kx_sB9bx22zDRrJcg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jin\_Nguyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jin_nguyen/32/781_2.png) [@Jin\_Nguyen](https://discuss.elastic.co/u/Jin_Nguyen)\
**Post date:** [April 14, 2015, 9:17am UTC](https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220/3 "2015-04-14T09:17:29Z")

</div>

Hi Doug,

These above settings just apart of my searching. It's make my index  
searchable. And I want to optimize this system as I said. Thanks for your  
reply

On Tuesday, April 14, 2015 at 9:17:08 AM UTC+7, Doug Turnbull wrote:

> Hello Jin
> 
> I don't see here how you're searching, but there's nothing in the default  
> searches that provides this functionality. You want to look into  
> Elasticsearch's suggestiers feature
> 
> [Suggesters | Elasticsearch Guide [1.5] | Elastic](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-suggesters.html)
> 
> -Doug
> 
> On Mon, Apr 13, 2015 at 9:49 PM, Jin Nguyen \<[jin...@gmail.com](mailto:jin...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hi all,
> > 
> > I setup an elasticsearch to search for my website and need to mapping  
> > some settings to index, this my settings config:
> > 
> > "settings": {  
> > "analysis": {  
> > "analyzer": {  
> > "my\_analyzer": {  
> > "type": "custom",  
> > "tokenizer": "whitespace",  
> > "filter": ["my\_stop\_word", "my\_lowercase", "my\_ascii\_folding"]  
> > }  
> > },  
> > "filter" : {  
> > "my\_stop\_word": {  
> > "type": "stop",  
> > "stopwords": "_english_"  
> > },  
> > "my\_lowercase": {  
> > "type": "lowercase"  
> > },  
> > "my\_ascii\_folding": {  
> > "type": "asciifolding"  
> > }  
> > }  
> > }  
> > }
> > 
> > This is mapping of index:
> > 
> > "properties" : {  
> > "actors" : {  
> > "type" : "string",  
> > "fields" : {  
> > "actors" : {  
> > "type" : "string",  
> > "omit\_norms" : "true",  
> > "index\_options" : "docs"  
> > },  
> > "my\_analyzer\_ngram" : {  
> > "type" : "string",  
> > "analyzer" : "my\_analyzer",  
> > "include\_in\_all" : "false"  
> > }  
> > }  
> > },  
> > ....
> > 
> > It search ok, but do not action something like google when I type  
> > something wrong, google will remind "Did you mean that?". Example:
> > 
> > If I type "King of thrones" to search with my db, of course db doesn't  
> > has any film named it like this, I expect that search engine will give a  
> > clue "Game of thrones" for user. That's mean if user search do not exactly,  
> > my website still can give a true result for them.
> > 
> > Thanks in advanced
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/21d84d3b-d624-4c63-9329-e9c4059b0a73%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> \*Doug Turnbull \*\*| \*Search Relevance Consultant | OpenSource Connections,  
> LLC | 240.476.9983 | [http://www.opensourceconnections.com](http://www.opensourceconnections.com)  
> Author: Taming Search [http://manning.com/turnbull](http://manning.com/turnbull) from Manning  
> Publications  
> This e-mail and all contents, including attachments, is considered to be  
> Company Confidential unless explicitly stated otherwise, regardless  
> of whether attachments are marked as such.

--  
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/70438847-9be4-492e-8a88-24c0a0a90cc9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70438847-9be4-492e-8a88-24c0a0a90cc9%40googlegroups.com).  
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, 12:19am UTC](https://discuss.elastic.co/t/help-mapping-in-elasticsearch-for-searching-content/23220/4 "2017-07-06T00:19:56Z")

</div>


