# FiltrES - A language that compiles to ElasticSearch Query DSL

**URL:** <https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283>\
**Category:** Elasticsearch\
**Created:** [December 16, 2014, 11:53pm UTC](https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283 "2014-12-16T23:53:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abe\_Haskins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abe_haskins/32/1049_2.png) [@Abe\_Haskins](https://discuss.elastic.co/u/Abe_Haskins)\
**Post date:** [December 16, 2014, 11:53pm UTC](https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283/1 "2014-12-16T23:53:12Z")

</div>

Hi folks!

I wanted to share FiltrES.js [https://github.com/abeisgreat/FiltrES.js](https://github.com/abeisgreat/FiltrES.js), a  
tool for compiling simple human readable expressions (i.e. '(height \<= 73 or  
(favorites.color == "green" and height != 73)) and firstname ~= "o.+")')  
into ES queries. This is useful for times when you want end users (or  
developers who aren't ES experts) to be able to query based on arbitrary  
filters. It doesn't use script filters, so it's safe and easy to use.

I'd love to get any thoughts/feedback as I am \*not \*an ES expert and  
FiltrES was written so I could use it, but I'm happy to expand it for more  
complex/interesting use cases.

Best,  
Abe

--  
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/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 17, 2014, 4:39am UTC](https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283/2 "2014-12-17T04:39:57Z")

</div>

Cool stuff Abe.

Just a note, I think it’s a nice feature for developers but I’m more concerned with "end users".

A dev knows that == means equal but a end user will use field=x  
Same for different. != does not mean anything for a non developer.

My 2 cents.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 17 déc. 2014 à 00:53, Abe Haskins [abeisgreat@abeisgreat.com](mailto:abeisgreat@abeisgreat.com) a écrit :
> 
> Hi folks!
> 
> I wanted to share FiltrES.js [https://github.com/abeisgreat/FiltrES.js](https://github.com/abeisgreat/FiltrES.js), a tool for compiling simple human readable expressions (i.e. '(height \<= 73 or (favorites.color == "green" and height != 73)) and firstname ~= "o.+")') into ES queries. This is useful for times when you want end users (or developers who aren't ES experts) to be able to query based on arbitrary filters. It doesn't use script filters, so it's safe and easy to use.
> 
> I'd love to get any thoughts/feedback as I am not an ES expert and FiltrES was written so I could use it, but I'm happy to expand it for more complex/interesting use cases.
> 
> Best,  
> Abe
> 
> --  
> 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/62BC1FF1-169C-45E3-B5A0-B69533419AAB%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/62BC1FF1-169C-45E3-B5A0-B69533419AAB%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [December 20, 2014, 8:36pm UTC](https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283/3 "2014-12-20T20:36:21Z")

</div>

Hi ,

How different is it from query\_string query langauge.  
Or is it using query\_string in the background.

Thanks  
Vineeth

On Wed, Dec 17, 2014 at 5:23 AM, Abe Haskins [abeisgreat@abeisgreat.com](mailto:abeisgreat@abeisgreat.com)  
wrote:

> Hi folks!
> 
> I wanted to share FiltrES.js [https://github.com/abeisgreat/FiltrES.js](https://github.com/abeisgreat/FiltrES.js),  
> a tool for compiling simple human readable expressions (i.e. '(height \<=  
> 73 or (favorites.color == "green" and height != 73)) and firstname ~= "o.+  
> ")') into ES queries. This is useful for times when you want end users  
> (or developers who aren't ES experts) to be able to query based on  
> arbitrary filters. It doesn't use script filters, so it's safe and easy to  
> use.
> 
> I'd love to get any thoughts/feedback as I am \*not \*an ES expert and  
> FiltrES was written so I could use it, but I'm happy to expand it for more  
> complex/interesting use cases.
> 
> Best,  
> Abe
> 
> --  
> 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/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/27d4008e-b2f3-4410-bc78-7343b5bbf8d7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAGdPd5%3D6iKTOaqGOSff94eanC0JqXVW0fEjE-9Ph04HDDpcx%2BQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D6iKTOaqGOSff94eanC0JqXVW0fEjE-9Ph04HDDpcx%2BQ%40mail.gmail.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, 12:42am UTC](https://discuss.elastic.co/t/filtres-a-language-that-compiles-to-elasticsearch-query-dsl/21283/4 "2017-07-06T00:42:32Z")

</div>


