# Contructing Mappings

**URL:** <https://discuss.elastic.co/t/contructing-mappings/9238>\
**Category:** Elasticsearch\
**Created:** [October 4, 2012, 12:06pm UTC](https://discuss.elastic.co/t/contructing-mappings/9238 "2012-10-04T12:06:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MyHeadHurts](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@MyHeadHurts](https://discuss.elastic.co/u/MyHeadHurts)\
**Post date:** [October 4, 2012, 12:06pm UTC](https://discuss.elastic.co/t/contructing-mappings/9238/1 "2012-10-04T12:06:33Z")

</div>

When defining indexing in in elasticsearch.yml I am wanting to index one  
field for one type differently for one of the others.

This is how my elasticsearch.yml file currently looks:

# Index Settings

index:  
bookshelf:  
types:  
book:  
mappings:

```
      title: {analyzer: customAnalyzer}

```

analysis:  
analyzer:  
# set standard analyzer with no stop words as the default for both  
indexing and searching  
default:  
type: standard  
stopwords: _none_  
customAnalyzer:  
type: custom  
tokenizer: nGramTokenizer  
filter: [lowercase,stopWordsFilter,asciifolding]  
tokenizer:  
nGramTokenizer:  
type: nGram  
min\_gram: 1  
max\_gram: 2  
filter:  
stopWordsFilter:  
type: stop  
stopwords: _none_

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 4, 2012, 12:15pm UTC](https://discuss.elastic.co/t/contructing-mappings/9238/2 "2012-10-04T12:15:01Z")

</div>

And what is your question?

May I suggest you read:  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html)  
[http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html)  
?

David

Le 4 octobre 2012 à 14:06, My Head Hurts [mathieson10@gmail.com](mailto:mathieson10@gmail.com) a écrit :

> When defining indexing in in elasticsearch.yml I am wanting to index one field  
> for one type differently for one of the others.
> 
> This is how my elasticsearch.yml file currently looks:
> 
> # Index Settings
> 
> index:  
> bookshelf:  
> types:  
> book:  
> mappings:
> 
> ```
> title: {analyzer: customAnalyzer}
> 
> ```
> 
> analysis:  
> analyzer:  
> # set standard analyzer with no stop words as the default for both  
> indexing and searching  
> default:  
> type: standard  
> stopwords: _none_  
> customAnalyzer:  
> type: custom  
> tokenizer: nGramTokenizer  
> filter: [lowercase,stopWordsFilter,asciifolding]  
> tokenizer:  
> nGramTokenizer:  
> type: nGram  
> min\_gram: 1  
> max\_gram: 2  
> filter:  
> stopWordsFilter:  
> type: stop  
> stopwords: _none_
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![MyHeadHurts](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@MyHeadHurts](https://discuss.elastic.co/u/MyHeadHurts)\
**Post date:** [October 4, 2012, 12:21pm UTC](https://discuss.elastic.co/t/contructing-mappings/9238/3 "2012-10-04T12:21:40Z")

</div>

Hi David

Thanks for your quick response (I was actually expecting this to be ignored  
since it isn't much of a question).

I have re-asked the question here[https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/TSSBZUPBK\_4](https://groups.google.com/forum/?fromgroups=#!topic/elasticsearch/TSSBZUPBK_4)if you wouldn't mind moving our discussion into there?

In regards to the link - I have read that documentation but I am using the  
Java Client so I think I need to specify this information in the  
elasticsearch.yml file which I I do not think I am doing correctly at the  
moment.

On Thursday, 4 October 2012 14:15:11 UTC+2, David Pilato wrote:

> And what is your question?
> 
> May I suggest you read:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html) ?
> 
> David
> 
> Le 4 octobre 2012 à 14:06, My Head Hurts \<[mathi...@gmail.com](mailto:mathi...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> When defining indexing in in elasticsearch.yml I am wanting to index one  
> field for one type differently for one of the others.
> 
> This is how my elasticsearch.yml file currently looks:
> 
> # Index Settings
> 
> index:  
> bookshelf:  
> types:  
> book:  
> mappings:
> 
> ```
> title: {analyzer: customAnalyzer} 
> 
> ```
> 
> analysis:  
> analyzer:  
> # set standard analyzer with no stop words as the default for both  
> indexing and searching  
> default:  
> type: standard  
> stopwords: _none_  
> customAnalyzer:  
> type: custom  
> tokenizer: nGramTokenizer  
> filter: [lowercase,stopWordsFilter,asciifolding]  
> tokenizer:  
> nGramTokenizer:  
> type: nGram  
> min\_gram: 1  
> max\_gram: 2  
> filter:  
> stopWordsFilter:  
> type: stop  
> stopwords: _none_
> 
> --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<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, 3:10am UTC](https://discuss.elastic.co/t/contructing-mappings/9238/4 "2017-07-06T03:10:08Z")

</div>


