# TF/IDF wihout TF

**URL:** <https://discuss.elastic.co/t/tf-idf-wihout-tf/21407>\
**Category:** Elasticsearch\
**Created:** [December 27, 2014, 3:10pm UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407 "2014-12-27T15:10:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Gaydenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_gaydenko/32/914_2.png) [@Andrew\_Gaydenko](https://discuss.elastic.co/u/Andrew_Gaydenko)\
**Post date:** [December 27, 2014, 3:10pm UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407/1 "2014-12-27T15:10:27Z")

</div>

How to turn TF off (that is a single term in a field is the same as  
multiple ones) in scoring (keeping IDF and field length)?

--  
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/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![softwaredoug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/softwaredoug/32/22681_2.png) [@softwaredoug](https://discuss.elastic.co/u/softwaredoug)\
**Post date:** [December 27, 2014, 3:35pm UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407/2 "2014-12-27T15:35:32Z")

</div>

You can turn off tf, but you also have to turn off positions at the same  
time. (There is no positions without term frequency). This implies you  
won't be able to do a phrase query. This leaves IDF and norms as the main  
scoring component

See the "index\_options" here for disabling term freq

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

-Doug

On Sat, Dec 27, 2014 at 10:10 AM, Andrew Gaydenko \<[andrew.gaydenko@gmail.com](mailto:andrew.gaydenko@gmail.com)

> wrote:

> How to turn TF off (that is a single term in a field is the same as  
> multiple ones) in scoring (keeping IDF and field length)?
> 
> --  
> 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/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Doug Turnbull  
Search & Big Data Architect  
OpenSource Connections [http://o19s.com](http://o19s.com)

--  
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/CALG6HL9ei6T1sAE30YXs%3D8QtBd%3DwuymfyOP0XUnaqW446HoQSQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALG6HL9ei6T1sAE30YXs%3D8QtBd%3DwuymfyOP0XUnaqW446HoQSQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Andrew\_Gaydenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_gaydenko/32/914_2.png) [@Andrew\_Gaydenko](https://discuss.elastic.co/u/Andrew_Gaydenko)\
**Post date:** [December 27, 2014, 3:44pm UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407/3 "2014-12-27T15:44:59Z")

</div>

Thanks! Having norms on and docs for index\_options will we keep scoring on  
the field length? - that is "abc" in "abc" has more score than in "abd  
def". In other words, do norms include field-length-based scoring factor?

On Saturday, December 27, 2014 6:35:39 PM UTC+3, Doug Turnbull wrote:

> You can turn off tf, but you also have to turn off positions at the same  
> time. (There is no positions without term frequency). This implies you  
> won't be able to do a phrase query. This leaves IDF and norms as the main  
> scoring component
> 
> See the "index\_options" here for disabling term freq
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html)
> 
> -Doug
> 
> On Sat, Dec 27, 2014 at 10:10 AM, Andrew Gaydenko \<[andrew....@gmail.com](mailto:andrew....@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > How to turn TF off (that is a single term in a field is the same as  
> > multiple ones) in scoring (keeping IDF and field length)?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d527960c-1407-4f61-b058-2baab38b4957%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Doug Turnbull  
> Search & Big Data Architect  
> OpenSource Connections [http://o19s.com](http://o19s.com)

--  
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/a6792674-1fcd-4c96-b409-f1f8c6d9b860%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a6792674-1fcd-4c96-b409-f1f8c6d9b860%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)\
**Post date:** [December 28, 2014, 12:37am UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407/4 "2014-12-28T00:37:57Z")

</div>

You can "disable" TF by multiplying it with itself. This requires adding a configuration in the base similarity module I think. I have not tried this yet, so please let us know if this will work!

/JZ

--  
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/a15814ff-f02e-472b-9d70-dcd9a5d860b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a15814ff-f02e-472b-9d70-dcd9a5d860b5%40googlegroups.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:41am UTC](https://discuss.elastic.co/t/tf-idf-wihout-tf/21407/5 "2017-07-06T00:41:46Z")

</div>


