# Completion type mapping

**URL:** <https://discuss.elastic.co/t/completion-type-mapping/20183>\
**Category:** Elasticsearch\
**Created:** [October 10, 2014, 3:52pm UTC](https://discuss.elastic.co/t/completion-type-mapping/20183 "2014-10-10T15:52:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozzy34](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ozzy34](https://discuss.elastic.co/u/ozzy34)\
**Post date:** [October 10, 2014, 3:52pm UTC](https://discuss.elastic.co/t/completion-type-mapping/20183/1 "2014-10-10T15:52:02Z")

</div>

Hi mates,

I am trying to create mapping in my auto completion scenario.

As shown below, I am using "copy\_to" command in order to copy a field value  
into a completion type which name is "factContent\_suggest".

The problem I have encountered is that I cannot update weight property by  
using "factContent\_suggest.weight".  
When I delete this statement, all suggestions come with default weight 1.0.

Thanks for your cooperation.

[http://localhost:9200/factindex/fact/\_mapping](http://localhost:9200/factindex/fact/_mapping)

{  
"fact" : {  
"properties" : {  
"factContent" : {"type" : "string","copy\_to" :  
"factContent\_suggest"},  
"ranking" : {"type" : "long","copy\_to":  
"factContent\_suggest.weight"},  
"factContent\_suggest" : {"type" : "completion","payloads" : true  
}

```
    }
}

```

}

--  
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/d7026e61-8366-4117-9b1c-bece1f490fa4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d7026e61-8366-4117-9b1c-bece1f490fa4%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:57am UTC](https://discuss.elastic.co/t/completion-type-mapping/20183/2 "2017-07-06T00:57:01Z")

</div>


