# Omit\_term\_freq\_and\_positions option

**URL:** <https://discuss.elastic.co/t/omit-term-freq-and-positions-option/3073>\
**Category:** Elasticsearch\
**Created:** [July 7, 2010, 4:01pm UTC](https://discuss.elastic.co/t/omit-term-freq-and-positions-option/3073 "2010-07-07T16:01:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Korbakov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_korbakov/32/3199_2.png) [@Michael\_Korbakov](https://discuss.elastic.co/u/Michael_Korbakov)\
**Post date:** [July 7, 2010, 4:01pm UTC](https://discuss.elastic.co/t/omit-term-freq-and-positions-option/3073/1 "2010-07-07T16:01:41Z")

</div>

Hi everyone.

I'm not sure if I getting the meaning of omit\_term\_freq\_and\_positions  
option for string fields correctly. In my understanding, setting this  
option to true will skip terms frequencies estimation during document  
indexing and also terms positions analysis during search scoring.  
Please, correct me if I'm wrong.

If I got option's meaning correctly, then it's worth to use it for  
fields that will be used for filtering only, like usernames,  
categorical values, etc. Is that true?

Thanks,

-- Michael Korbakov

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [July 7, 2010, 6:23pm UTC](https://discuss.elastic.co/t/omit-term-freq-and-positions-option/3073/2 "2010-07-07T18:23:46Z")

</div>

That is correct. You can see this same thing in Lucene/Solr and in  
Solr, which has the notion of an index schema and field types, you can  
see that this option is enabled for "string" type by default, which is  
what one tends to use for fields that can be used for filtering, where  
the term frequency and their position doesn't play a role.

c.f.  
[http://search-lucene.com/?q=omit+terms+positions+freq](http://search-lucene.com/?q=omit+terms+positions+freq)

## Otis

Sematext -- [http://sematext.com/](http://sematext.com/) -- Solr - Lucene - Nutch

On Jul 7, 12:01 pm, Mykhailo Korbakov [rmih...@gmail.com](mailto:rmih...@gmail.com) wrote:

> Hi everyone.
> 
> I'm not sure if I getting the meaning of omit\_term\_freq\_and\_positions  
> option for string fields correctly. In my understanding, setting this  
> option to true will skip terms frequencies estimation during document  
> indexing and also terms positions analysis during search scoring.  
> Please, correct me if I'm wrong.
> 
> If I got option's meaning correctly, then it's worth to use it for  
> fields that will be used for filtering only, like usernames,  
> categorical values, etc. Is that true?
> 
> Thanks,
> 
> -- Michael Korbakov

---

<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, 4:22am UTC](https://discuss.elastic.co/t/omit-term-freq-and-positions-option/3073/3 "2017-07-06T04:22:36Z")

</div>


