# Does the field used in field\_value\_factor function scoring need to be an 'indexed' field, or can it just be 'stored'?

**URL:** <https://discuss.elastic.co/t/does-the-field-used-in-field-value-factor-function-scoring-need-to-be-an-indexed-field-or-can-it-just-be-stored/253244>\
**Category:** Elasticsearch\
**Created:** [October 25, 2020, 6:06pm UTC](https://discuss.elastic.co/t/does-the-field-used-in-field-value-factor-function-scoring-need-to-be-an-indexed-field-or-can-it-just-be-stored/253244 "2020-10-25T18:06:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbalakrishnan](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jbalakrishnan](https://discuss.elastic.co/u/jbalakrishnan)\
**Post date:** [October 25, 2020, 6:06pm UTC](https://discuss.elastic.co/t/does-the-field-used-in-field-value-factor-function-scoring-need-to-be-an-indexed-field-or-can-it-just-be-stored/253244/1 "2020-10-25T18:06:49Z")

</div>

I need to use a positive-valued float or double value field, one field value per document, that I compute at index time. I want to use this value to boost the score of each document matching an arbitrary query, by the value of this field. I plan to use a function score query, with field value factor as the function, for this purpose.

The field will never be used directly as a term in a search query (term query, match query, etc.). It's sole purpose is to be used for multiplicative boosting of the scores of documents that match other queries.

My question is, should this field be indexed (in this case, what should be the mapping and the type of analyzer), or can it be just a 'stored' field?

Would appreciate any clarification on this.  
Thanks a lot!

---

<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:** [November 22, 2020, 6:06pm UTC](https://discuss.elastic.co/t/does-the-field-used-in-field-value-factor-function-scoring-need-to-be-an-indexed-field-or-can-it-just-be-stored/253244/2 "2020-11-22T18:06:58Z")

</div>

Closed on November 22, 2020, 6:06pm UTC

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