# How can we percolate with dynamic fields?

**URL:** <https://discuss.elastic.co/t/how-can-we-percolate-with-dynamic-fields/139765>\
**Category:** Elasticsearch\
**Created:** [July 12, 2018, 1:31pm UTC](https://discuss.elastic.co/t/how-can-we-percolate-with-dynamic-fields/139765 "2018-07-12T13:31:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeroen\_Cools](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeroen_cools/32/33283_2.png) [@Jeroen\_Cools](https://discuss.elastic.co/u/Jeroen_Cools)\
**Post date:** [July 12, 2018, 1:31pm UTC](https://discuss.elastic.co/t/how-can-we-percolate-with-dynamic-fields/139765/1 "2018-07-12T13:31:39Z")

</div>

Having a similar problem/question as [Percolators and Dynamic templates](https://discuss.elastic.co/t/percolators-and-dynamic-templates/69783) though that got closed without any replies.

**Our use case:**

We have products with various dynamic properties, saved as ranges or numeric values. Our mapping is set up with a dynamic template to allow for growth and not having to worry about every single property any product could have.  
Based on this, we have filters that could display products that would match the given properties.

Now we want to percolate, and are a bit slowed down by the issue that Elasticsearch 5.5 and up, no longer allows percolating against dynamic fields (the percolator doesn't add these fields anymore to it's own mapping).

Is there a way to still have a dynamic template in the source, without having to put the end result in the percolate mapping every time a new property is being created?

**Example mapping**

```auto
 {
  "product_percolator_nl_1_10_1531119901539": {
    "mappings": {
      "product": {
        "dynamic_templates": [
          {
            "numeric_facets": {
              "path_match": "numericFacets.*",
              "mapping": {
                "type": "double"
              }
            }
          }
        ],
        "properties": {
          "id": {
            "type": "keyword",
            "index": false
          },
          "query": {
            "properties": {
              "bool": {
                "properties": {
                  "filter": {
                    "properties": {
                      "term": {
                        "properties": {
                          "optionFacets": {
                            "type": "text",
                            "fields": {
                              "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                              }
                            }
                          }
                        }
                      },
                      "terms": {
                        "properties": {
                          "numericFacets": {
                            "type": "text",
                            "fields": {
                              "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Jeroen\_Cools](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeroen_cools/32/33283_2.png) [@Jeroen\_Cools](https://discuss.elastic.co/u/Jeroen_Cools)\
**Post date:** [July 16, 2018, 8:36am UTC](https://discuss.elastic.co/t/how-can-we-percolate-with-dynamic-fields/139765/2 "2018-07-16T08:36:06Z")

</div>

Really looking for some help, since manually updating the mapping isn't really a viable solution.

---

<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:** [August 13, 2018, 8:36am UTC](https://discuss.elastic.co/t/how-can-we-percolate-with-dynamic-fields/139765/3 "2018-08-13T08:36:07Z")

</div>

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