# Score based on phrase frequency only

**URL:** https://discuss.elastic.co/t/score-based-on-phrase-frequency-only/17105
**Category:** Elasticsearch
**Created:** [April 21, 2014, 7:38am UTC](https://discuss.elastic.co/t/score-based-on-phrase-frequency-only/17105 "2014-04-21T07:38:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Zweigenhaft](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@David\_Zweigenhaft](https://discuss.elastic.co/u/David_Zweigenhaft)
#### Post date: [April 21, 2014, 7:38am UTC](https://discuss.elastic.co/t/score-based-on-phrase-frequency-only/17105/1 "2014-04-21T07:38:39Z")

</div>

I am new in Elasticserach.

I would like to score based entirely on phrase count (per document).

For example, given the following two documents:

1. { "The quick brown fox" }

2. { "The quick brown fox ..... The quick brown fox ......" }

I want to count how many times the "The quick brown fox " repeats in each  
documents.

I expect that the first document will get the score 1 (or 0.1), and the  
second document the score 2 (or 0.2).

Can I do it with term frequency ?.

I'm really stuck with this and need help.

Thank you

--  
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/af63d977-a1ec-450e-9abe-020403661d9e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/af63d977-a1ec-450e-9abe-020403661d9e%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, 1:34am UTC](https://discuss.elastic.co/t/score-based-on-phrase-frequency-only/17105/2 "2017-07-06T01:34:43Z")

</div>


