# ES gives very different scores, in match\_phrase\_prefix, for similar documents even I use DfsQueryThenFetch

**URL:** <https://discuss.elastic.co/t/es-gives-very-different-scores-in-match-phrase-prefix-for-similar-documents-even-i-use-dfsquerythenfetch/21163>\
**Category:** Elasticsearch\
**Created:** [December 9, 2014, 12:17pm UTC](https://discuss.elastic.co/t/es-gives-very-different-scores-in-match-phrase-prefix-for-similar-documents-even-i-use-dfsquerythenfetch/21163 "2014-12-09T12:17:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehmet\_Cem\_Gunturkun](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Mehmet\_Cem\_Gunturkun](https://discuss.elastic.co/u/Mehmet_Cem_Gunturkun)\
**Post date:** [December 9, 2014, 12:17pm UTC](https://discuss.elastic.co/t/es-gives-very-different-scores-in-match-phrase-prefix-for-similar-documents-even-i-use-dfsquerythenfetch/21163/1 "2014-12-09T12:17:00Z")

</div>

Hi everyone,

I have some problems about phrase prefix search on ES.

I have an index which has these documents:

id:1 -\> ABC DEF XYZ QWE

id:2 -\> XYZ QWE ABC DEF

id:3 -\> ABC XYZ STH XYZ QWE

id:4 -\> KLM PRE TUV JKL

id:5 -\> KLM JKL PRE TUV …(40-Million records in total)

when I invoke a search with query like this:

{  
{

"bool" : {

"must" : {

```
 "match" : {

   "fullString" : {

     "query" : "ABC DEF XYZ QWE",

     "type" : "boolean",

     "operator" : "OR",

     "cutoff_frequency" : 0.01

   }

 }

```

},

"should" : [ {

```
 "match" : {

   "fullString" : {

     "query" : "ABC DEF XYZ QWE",

     "type" : "phrase"

   }

 }

```

}, {

```
 "match" : {

   "fullString" : {

     "query" : "ABC DEF XYZ QWE",

     "type" : "phrase_prefix",

     "max_expansions" : 3

   }

 }

```

} ]

}

}

id:1 -\> ABC DEF XYZ QWE -\> score: 58.6

id:2 -\> XYZ QWE ABC DEF -\> score: 0.56

id:3 -\> ABC XYZ STH XYZ QWE -\> score: 0.53

and when I query = "PRE TUV"

id:4 -\> KLM PRE TUV JKL

id:5 -\> KLM JKL PRE TUV these documents have very unlikely scores. Is  
there anyone who could explain me or give a link of detailed documentation  
about this problem?

--  
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/3b814721-0861-41c9-9db0-e2310be009cd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3b814721-0861-41c9-9db0-e2310be009cd%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:44am UTC](https://discuss.elastic.co/t/es-gives-very-different-scores-in-match-phrase-prefix-for-similar-documents-even-i-use-dfsquerythenfetch/21163/2 "2017-07-06T00:44:45Z")

</div>


