# Get function score value as fields

**URL:** <https://discuss.elastic.co/t/get-function-score-value-as-fields/28129>\
**Category:** Elasticsearch\
**Created:** [August 26, 2015, 4:57pm UTC](https://discuss.elastic.co/t/get-function-score-value-as-fields/28129 "2015-08-26T16:57:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Scheffer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mauricio_scheffer/32/905_2.png) [@Mauricio\_Scheffer](https://discuss.elastic.co/u/Mauricio_Scheffer)\
**Post date:** [August 26, 2015, 4:57pm UTC](https://discuss.elastic.co/t/get-function-score-value-as-fields/28129/1 "2015-08-26T16:57:29Z")

</div>

Hi,

I'm looking for the equivalent of [this Solr feature](http://wiki.apache.org/solr/CommonQueryParameters#functions) which allows me to get a function score value as a pseudo-field. I don't see anything similar in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html)...  
Perhaps it's possible to call custom function score queries in script\_fields? If so, how? Again I don't see anything about this in the docs.  
Without this feature I'd be forced to parse the explanation tree which is cumbersome, error-prone and slow.

Thanks,  
Mauricio

---

<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 5, 2017, 11:53pm UTC](https://discuss.elastic.co/t/get-function-score-value-as-fields/28129/2 "2017-07-05T23:53:41Z")

</div>


