# Filtering/querying on script field

**URL:** <https://discuss.elastic.co/t/filtering-querying-on-script-field/21669>\
**Category:** Elasticsearch\
**Created:** [January 15, 2015, 7:40pm UTC](https://discuss.elastic.co/t/filtering-querying-on-script-field/21669 "2015-01-15T19:40:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samatha\_kankipati](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@samatha\_kankipati](https://discuss.elastic.co/u/samatha_kankipati)\
**Post date:** [January 15, 2015, 7:40pm UTC](https://discuss.elastic.co/t/filtering-querying-on-script-field/21669/1 "2015-01-15T19:40:44Z")

</div>

Is it possible to filter or query on script\_fields.  
If so, can you provide any example..

--  
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/6d4c738b-0975-4711-b9e1-a7d6eaa7830b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d4c738b-0975-4711-b9e1-a7d6eaa7830b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![masaru](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@masaru](https://discuss.elastic.co/u/masaru)\
**Post date:** [January 16, 2015, 4:22am UTC](https://discuss.elastic.co/t/filtering-querying-on-script-field/21669/2 "2015-01-16T04:22:04Z")

</div>

Hi Samatha,

I don’t think so because script field is created from fields of hit document, results of query/filter.  
You can use script filter instead [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html#query-dsl-script-filter).

Masaru

On January 16, 2015 at 04:40:49, samatha kankipati ([samatha.kankipati@gmail.com](mailto:samatha.kankipati@gmail.com)) wrote:

> Is it possible to filter or query on script\_fields.  
> If so, can you provide any example..
> 
> --  
> 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/6d4c738b-0975-4711-b9e1-a7d6eaa7830b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d4c738b-0975-4711-b9e1-a7d6eaa7830b%40googlegroups.com).  
> 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/etPan.54b89229.3d1b58ba.1877%40citra.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54b89229.3d1b58ba.1877%40citra.local).  
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:38am UTC](https://discuss.elastic.co/t/filtering-querying-on-script-field/21669/3 "2017-07-06T00:38:29Z")

</div>


