# Mapping for metadata in percolator queries

**URL:** <https://discuss.elastic.co/t/mapping-for-metadata-in-percolator-queries/9805>\
**Category:** Elasticsearch\
**Created:** [November 23, 2012, 2:22pm UTC](https://discuss.elastic.co/t/mapping-for-metadata-in-percolator-queries/9805 "2012-11-23T14:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christer](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@Christer](https://discuss.elastic.co/u/Christer)\
**Post date:** [November 23, 2012, 2:22pm UTC](https://discuss.elastic.co/t/mapping-for-metadata-in-percolator-queries/9805/1 "2012-11-23T14:22:49Z")

</div>

We want to store some meta data with the queries we register in a  
percolator, and want to map these as not analyzed. It seems that creating  
the mapping works:

curl -XPUT localhost:9200/\_percolator/indexname/\_mapping -d '{ ... }'

but after the first percolator query is registered in this percolator the  
existing mapping is overwritten with the dynamic one, which causes all  
extra fields to be analyzed. Is there a way to force these extra fields to  
not be analyzed?

--

---

<div class="post-metadata">

**Author:** ![Christer](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@Christer](https://discuss.elastic.co/u/Christer)\
**Post date:** [January 3, 2013, 11:33pm UTC](https://discuss.elastic.co/t/mapping-for-metadata-in-percolator-queries/9805/2 "2013-01-03T23:33:31Z")

</div>

It seems the error is related to me not including the type when PUT-ing the  
mapping:

curl -XPUT localhost:9200/\_percolator/indexname/\_mapping -d '{"properties":  
{ ... }}'

_is not_ OK, but

curl -XPUT localhost:9200/\_percolator/indexname/\_mapping -d '{"indexname":  
{"properties": { ... }}}'

_is_.

On Friday, November 23, 2012 3:22:49 PM UTC+1, Christer wrote:

> We want to store some meta data with the queries we register in a  
> percolator, and want to map these as not analyzed. It seems that creating  
> the mapping works:
> 
> curl -XPUT localhost:9200/\_percolator/indexname/\_mapping -d '{ ... }'
> 
> but after the first percolator query is registered in this percolator the  
> existing mapping is overwritten with the dynamic one, which causes all  
> extra fields to be analyzed. Is there a way to force these extra fields to  
> not be analyzed?

--

---

<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, 2:57am UTC](https://discuss.elastic.co/t/mapping-for-metadata-in-percolator-queries/9805/3 "2017-07-06T02:57:55Z")

</div>

Closed on July 6, 2017, 2:57am UTC


