# Failed to create index..Please help

**URL:** https://discuss.elastic.co/t/failed-to-create-index-please-help/56003
**Category:** Elasticsearch
**Created:** [July 20, 2016, 4:43pm UTC](https://discuss.elastic.co/t/failed-to-create-index-please-help/56003 "2016-07-20T16:43:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)
#### Post date: [July 20, 2016, 4:43pm UTC](https://discuss.elastic.co/t/failed-to-create-index-please-help/56003/1 "2016-07-20T16:43:10Z")

</div>

[2016-07-20 16:18:08,400][DEBUG][action.admin.indices.create] [ElasticSearch-14] [content] failed to create  
org.elasticsearch.index.mapper.MapperParsingException: mapping [logs]  
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:394)  
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:374)  
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:196)  
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:162)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: org.elasticsearch.index.mapper.MapperParsingException: Field [title] cannot be analyzed and have doc values  
at org.elasticsearch.index.mapper.core.StringFieldMapper.(StringFieldMapper.java:207)  
at org.elasticsearch.index.mapper.core.StringFieldMapper$Builder.build(StringFieldMapper.java:140)  
at org.elasticsearch.index.mapper.core.StringFieldMapper$Builder.build(StringFieldMapper.java:72)  
at org.elasticsearch.index.mapper.object.ObjectMapper$Builder.build(ObjectMapper.java:165)  
at org.elasticsearch.index.mapper.DocumentMapper$Builder.(DocumentMapper.java:167)  
at org.elasticsearch.index.mapper.MapperBuilders.doc(MapperBuilders.java:41)  
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:211)  
Here is a portion of the mapping:  
curl -XPUT localhost:9200/\_template/content -d '  
{  
"template": "content\*",  
"settings": {  
"index.mapper.dynamic": "false",  
"index.number\_of\_replicas": "1",  
"index.number\_of\_shards": "17"  
},  
"mappings": {  
"logs": {  
"properties": {  
"@timestamp": {  
"type": "date",  
"format": "dateOptionalTime",  
"doc\_values": true  
},  
"content": {  
"type": "string",  
"doc\_values": true  
},  
"keyword": {  
"type": "object",  
"doc\_values": true  
},  
"title": {  
"type": "string",  
"doc\_values": true  
},  
"url": {  
"type": "string",  
"index": "not\_analyzed",  
"doc\_values": true  
},

---

<div class="post-metadata">

### Author: ![tinle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tinle](https://discuss.elastic.co/u/tinle)
#### Post date: [July 20, 2016, 4:58pm UTC](https://discuss.elastic.co/t/failed-to-create-index-please-help/56003/2 "2016-07-20T16:58:40Z")

</div>

> [@genesis](#):
>
> Caused by: org.elasticsearch.index.mapper.MapperParsingException: Field [title] cannot be analyzed and have doc values

> [@genesis](#):
>
> "title": { "type": "string", "doc\_values": true },

You need to add [quote="genesis, post:1, topic:56003"]  
"index": "not\_analyzed",  
[/quote]

to mapping for "title"

---

<div class="post-metadata">

### Author: ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)
#### Post date: [July 20, 2016, 5:16pm UTC](https://discuss.elastic.co/t/failed-to-create-index-please-help/56003/3 "2016-07-20T17:16:50Z")

</div>

Thanks it works

---

<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 5, 2017, 10:33pm UTC](https://discuss.elastic.co/t/failed-to-create-index-please-help/56003/4 "2017-07-05T22:33:58Z")

</div>


