# Question on scoring

**URL:** <https://discuss.elastic.co/t/question-on-scoring/81401>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 4:04am UTC](https://discuss.elastic.co/t/question-on-scoring/81401 "2017-04-06T04:04:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobkoon](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bobkoon](https://discuss.elastic.co/u/bobkoon)\
**Post date:** [April 6, 2017, 4:04am UTC](https://discuss.elastic.co/t/question-on-scoring/81401/1 "2017-04-06T04:04:15Z")

</div>

Dear all,

I have a testing on Elasticsearch and I have a problem. I have a simple settings my index "addresstest4" like this:

> PUT addresstest4  
> {  
> "mappings" : {  
> "external" : {  
> "properties": {  
> "address": {  
> "type": "text",  
> "analyzer" : "whitespace"  
> }  
> }  
> }  
> }  
> }

And then I have put bulk data to addresstest4/external like this:

> {"index":{"\_id":"1"}}  
> {"address" : "ab cde cfg lmn"}  
> {"index":{"\_id":"2"}}  
> {"address" : "ab hig don"}  
> {"index":{"\_id":"3"}}  
> {"address" : "ab cde jkg qrn"}  
> {"index":{"\_id":"4"}}  
> {"address" : "ab cde jkg stun"}  
> {"index":{"\_id":"5"}}  
> {"address" : "ab hig pvn"}  
> {"index":{"\_id":"6"}}  
> {"address" : "ab cde cfg pxn"}  
> {"index":{"\_id":"7"}}  
> {"address" : "ab cde cfg yzn"}

And then I try to search the "ab hig pvn" result using "hig pvn", therefore I perform search like this:

> GET /addresstest4/\_search  
> {  
> "query": {  
> "match" : { "address" : {  
> "query" :"hig pvn",  
> "analyzer": "whitespace"  
> }  
> }},  
> "highlight" : {  
> "fields" : {  
> "address" : {}  
> }  
> }  
> }

However I got the result like this:

> {  
> "took": 5,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 5,  
> "successful": 5,  
> "failed": 0  
> },  
> "hits": {  
> "total": 2,  
> "max\_score": 0.94566005,  
> "hits": [  
> {  
> "\_index": "addresstest4",  
> "\_type": "external",  
> "\_id": "2",  
> "\_score": 0.94566005,  
> "\_source": {  
> "address": "ab hig don"  
> },  
> "highlight": {  
> "address": [  
> "ab _hig_ don"  
> ]  
> }  
> },  
> {  
> "\_index": "addresstest4",  
> "\_type": "external",  
> "\_id": "5",  
> "\_score": 0.5063205,  
> "\_source": {  
> "address": "ab hig pvn"  
> },  
> "highlight": {  
> "address": [  
> "ab _hig_ _pvn_"  
> ]  
> }  
> }  
> ]  
> }  
> }

My question is: Why "ab hig don" will have a higher score than "ab hig pvn" when I search using "hig pvn"?

Regards,  
Bob

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 6, 2017, 12:06pm UTC](https://discuss.elastic.co/t/question-on-scoring/81401/2 "2017-04-06T12:06:23Z")

</div>

My first guess is that is has to with [search\_type](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-type.html).

---

<div class="post-metadata">

**Author:** ![billnbell](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@billnbell](https://discuss.elastic.co/u/billnbell)\
**Post date:** [April 6, 2017, 9:52pm UTC](https://discuss.elastic.co/t/question-on-scoring/81401/3 "2017-04-06T21:52:41Z")

</div>

Does it take longer to compute using dfs\_query\_then\_fetch. ? And it seems like it would be more accurate?

---

<div class="post-metadata">

**Author:** ![bobkoon](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@bobkoon](https://discuss.elastic.co/u/bobkoon)\
**Post date:** [April 7, 2017, 2:31am UTC](https://discuss.elastic.co/t/question-on-scoring/81401/4 "2017-04-07T02:31:00Z")

</div>

I have tried "dfs\_query\_then\_fetch" and it works, thanks a lot, although I don't know the detail behind 😂

---

<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:** [May 5, 2017, 2:31am UTC](https://discuss.elastic.co/t/question-on-scoring/81401/5 "2017-05-05T02:31:13Z")

</div>

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