# Nest - range filter in a form of BaseFilter

**URL:** <https://discuss.elastic.co/t/nest-range-filter-in-a-form-of-basefilter/19053>\
**Category:** Elasticsearch\
**Created:** [August 3, 2014, 11:47am UTC](https://discuss.elastic.co/t/nest-range-filter-in-a-form-of-basefilter/19053 "2014-08-03T11:47:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam\_porat](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@adam\_porat](https://discuss.elastic.co/u/adam_porat)\
**Post date:** [August 3, 2014, 11:47am UTC](https://discuss.elastic.co/t/nest-range-filter-in-a-form-of-basefilter/19053/1 "2014-08-03T11:47:05Z")

</div>

Hi,  
I'm using Nest version 0.12.0.  
I need to get a range filter in a form of BaseFilter.  
However, this line of code creates a faulty BaseFilter which doesn't  
contain the actual condition:  
_agg.ElasticsearchFilter = Nest.Filter.Range(i =\>  
i.GreaterOrEquals(filteredUpdateDate));_  
Is this a bug, or am I doing something wrong?  
Any way that will enable to cast from a RangeFilterDescriptor to a  
BaseFilter will do.  
This is becase .FacetFilter( i =\> i.Bool(j =\> j.Must(...))) accepts a  
BaseFilter[].  
Thank you.

--  
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/7bb41594-74c8-440a-92fb-c78678129933%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7bb41594-74c8-440a-92fb-c78678129933%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![adam\_porat](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@adam\_porat](https://discuss.elastic.co/u/adam_porat)\
**Post date:** [August 5, 2014, 8:12am UTC](https://discuss.elastic.co/t/nest-range-filter-in-a-form-of-basefilter/19053/2 "2014-08-05T08:12:48Z")

</div>

Any ideas anyone?

בתאריך יום ראשון, 3 באוגוסט 2014 14:47:05 UTC+3, מאת Adam Porat:

> Hi,  
> I'm using Nest version 0.12.0.  
> I need to get a range filter in a form of BaseFilter.  
> However, this line of code creates a faulty BaseFilter which doesn't  
> contain the actual condition:  
> _agg.ElasticsearchFilter = Nest.Filter.Range(i =\>  
> i.GreaterOrEquals(filteredUpdateDate));_  
> Is this a bug, or am I doing something wrong?  
> Any way that will enable to cast from a RangeFilterDescriptor to a  
> BaseFilter will do.  
> This is becase .FacetFilter( i =\> i.Bool(j =\> j.Must(...))) accepts a  
> BaseFilter.  
> Thank you.

--  
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/59cfd185-5beb-4d9a-afd8-8c1664912e41%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/59cfd185-5beb-4d9a-afd8-8c1664912e41%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, 1:10am UTC](https://discuss.elastic.co/t/nest-range-filter-in-a-form-of-basefilter/19053/3 "2017-07-06T01:10:48Z")

</div>

Closed on July 6, 2017, 1:10am UTC


