# Percolator type : Why fields are not part of the percolator type settings?

**URL:** <https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697>\
**Category:** Elasticsearch\
**Created:** [February 27, 2018, 4:46pm UTC](https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697 "2018-02-27T16:46:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pulse14](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@pulse14](https://discuss.elastic.co/u/pulse14)\
**Post date:** [February 27, 2018, 4:46pm UTC](https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697/1 "2018-02-27T16:46:21Z")

</div>

I don't understand why we need to define fields of the percolated document on the same mapping of the percolate type.

If these fields are just used to "preprocess the document defined in the percolator query ",  
**Why the percolate type doesn't take the percolated document mapping as settings ? It will be much easier.**

---

<div class="post-metadata">

**Author:** ![pulse14](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@pulse14](https://discuss.elastic.co/u/pulse14)\
**Post date:** [March 11, 2018, 4:41pm UTC](https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697/2 "2018-03-11T16:41:27Z")

</div>

up 🙂

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [March 12, 2018, 7:05am UTC](https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697/3 "2018-03-12T07:05:18Z")

</div>

Hi @pulse14, when the `percolate` query is percolating a document it indexes it into a temporary in-memory index. In order to do that the `percolate` query needs to know how to index that document and for this reason it needs a mapping. Currently it uses the mapping the `percolator` field is defined in.

I agree it would be more clear to understand if the `percolator` field could accept field definitions / mapping. At least then the context is more clear. However that is currently difficult to do with how internally in ES things are structured.

---

<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:** [April 9, 2018, 7:05am UTC](https://discuss.elastic.co/t/percolator-type-why-fields-are-not-part-of-the-percolator-type-settings/121697/4 "2018-04-09T07:05:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
