# Control Range Slider does not match Is Between Operator Filter

**URL:** <https://discuss.elastic.co/t/control-range-slider-does-not-match-is-between-operator-filter/301796>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [April 6, 2022, 7:39pm UTC](https://discuss.elastic.co/t/control-range-slider-does-not-match-is-between-operator-filter/301796 "2022-04-06T19:39:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsmith](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bsmith](https://discuss.elastic.co/u/bsmith)\
**Post date:** [April 6, 2022, 7:39pm UTC](https://discuss.elastic.co/t/control-range-slider-does-not-match-is-between-operator-filter/301796/1 "2022-04-06T19:39:35Z")

</div>

Using ELK 7.10

When adding a filter via the Range Slider in Controls it uses gte/lte. You can also see a visual bug where the second value does not show in the filter.

```auto
{
  "script": {
    "script": {
      "lang": "painless",
      "params": {
        "gte": 0,
        "lte": 2,
        "value": ">=0 <=2"
      },
      "source": "boolean gte(Supplier s, def v) {return s.get() >= v} boolean lte(Supplier s, def v) {return s.get() <= v}gte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.gte) && lte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.lte)"
    }
  }
}

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1d0f695ff7bd0654343e423b4066508761345a8d.png)

If you add the filter manually from the "Add Filter" at the top, it applies gte/lt.

```auto
{
  "script": {
    "script": {
      "lang": "painless",
      "params": {
        "gte": 0,
        "lt": 2,
        "value": ">=0 <2"
      },
      "source": "boolean gte(Supplier s, def v) {return s.get() >= v} boolean lt(Supplier s, def v) {return s.get() < v}gte(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.gte) && lt(() -> { doc['SERVICE_HRS_ORCL_ES_ENG'].value }, params.lt)"
    }
  }
}

```

The range aggregation's "from/to" uses "gte/lt", so when users use the range slider to filter dashboard results it causes mixed results to show. Is there any setting I can change somewhere to fix this? Or do I need to get crafty with my ranges to make it work with the controls? I can put 0 to 1.99 and 2 to 4.99 etc, but if the range aggregation is designed to work with gte/lt and manually adding an is between filter applies gte/lt; Then why is the controls range slider off in its own little world?

Years of Service Range showing results in both columns due to controls range slider using gte/lte  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/6/168d7b2d995e3502e53c1a62478ef249550f22a5.png)

---

<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:** [May 4, 2022, 7:39pm UTC](https://discuss.elastic.co/t/control-range-slider-does-not-match-is-between-operator-filter/301796/2 "2022-05-04T19:39:36Z")

</div>

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