# Is \_id of document affects on scoring?

**URL:** https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007
**Category:** Elasticsearch
**Created:** [March 31, 2015, 1:18pm UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007 "2015-03-31T13:18:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mohammad\_R\_esmailzad](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mohammad\_R\_esmailzad](https://discuss.elastic.co/u/Mohammad_R_esmailzad)
#### Post date: [March 31, 2015, 1:18pm UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007/1 "2015-03-31T13:18:21Z")

</div>

I add two same documents the only different thing is \_id of documents (I  
restart scenario for each of them and I do not add them sequentially. to be  
sure my test is correct)

one of them changes order of result of this query and one of them does not:

GET index\_for\_test/business/\_search  
{

```
"query": {
        "multi_match": {
        "query": "italian",
        "type": "most_fields",
        "fields": ["name^10", "categories"]
      }
}

```

}

i think it should be bug

my original question was:

> <https://github.com/elastic/elasticsearch/issues/10341>

--  
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/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [March 31, 2015, 1:23pm UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007/2 "2015-03-31T13:23:42Z")

</div>

The difference is probably due to the fact that your documents ended on  
different shards where doc frequencies are different. You should be able to  
make it a bit better by using distributed frequencies.

> **[Understanding "Query Then Fetch" vs "DFS Query Then Fetch"](https://www.elastic.co/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch)**

On Tue, Mar 31, 2015 at 3:18 PM, Mohammad.R esmailzadeh \<  
[esmailzadeh@gmail.com](mailto:esmailzadeh@gmail.com)\> wrote:

> I add two same documents the only different thing is \_id of documents (I  
> restart scenario for each of them and I do not add them sequentially. to be  
> sure my test is correct)
> 
> one of them changes order of result of this query and one of them does  
> not:
> 
> GET index\_for\_test/business/\_search  
> {
> 
> ```
> "query": {
> "multi_match": {
> "query": "italian",
> "type": "most_fields",
> "fields": ["name^10", "categories"]
> }
> }
> 
> ```
> 
> }
> 
> i think it should be bug
> 
> my original question was:
> 
> [adding irrelevant document change order of result · Issue #10341 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/10341)
> 
> --  
> 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/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien

--  
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/CAO5%3DkAg-z%3DDqNptG14Ekp\_czAYLxCZXYkgzK%3DokV3X9f6d%2BvSA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAg-z%3DDqNptG14Ekp_czAYLxCZXYkgzK%3DokV3X9f6d%2BvSA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Mohammad\_R\_esmailzad](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mohammad\_R\_esmailzad](https://discuss.elastic.co/u/Mohammad_R_esmailzad)
#### Post date: [March 31, 2015, 2:13pm UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007/3 "2015-03-31T14:13:54Z")

</div>

Thanks for your response.  
it is completely confusing for me why elasticsearch was configured for  
large data by default instead of development and developers should find  
these tiny tips under thousands of documentations.  
On Tuesday, 31 March 2015 17:54:00 UTC+4:30, Adrien Grand wrote:

> The difference is probably due to the fact that your documents ended on  
> different shards where doc frequencies are different. You should be able to  
> make it a bit better by using distributed frequencies.  
> [Understanding "Query Then Fetch" vs "DFS Query Then Fetch" | Elastic Blog](https://www.elastic.co/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch)
> 
> On Tue, Mar 31, 2015 at 3:18 PM, Mohammad.R esmailzadeh \<  
> [esmai...@gmail.com](mailto:esmai...@gmail.com) \<javascript:\>\> wrote:
> 
> > I add two same documents the only different thing is \_id of documents (I  
> > restart scenario for each of them and I do not add them sequentially. to be  
> > sure my test is correct)
> > 
> > one of them changes order of result of this query and one of them does  
> > not:
> > 
> > GET index\_for\_test/business/\_search  
> > {
> > 
> > ```
> > "query": {
> > "multi_match": {
> > "query": "italian",
> > "type": "most_fields",
> > "fields": ["name^10", "categories"]
> > }
> > }
> > 
> > ```
> > 
> > }
> > 
> > i think it should be bug
> > 
> > my original question was:
> > 
> > [adding irrelevant document change order of result · Issue #10341 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/10341)
> > 
> > --  
> > 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/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5d0eba0f-0809-4a68-b247-0640addb9119%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien

--  
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/b78aa9d8-2e22-40a3-b36b-5817fd2567ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b78aa9d8-2e22-40a3-b36b-5817fd2567ef%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [March 31, 2015, 3:42pm UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007/4 "2015-03-31T15:42:46Z")

</div>

On Tue, Mar 31, 2015 at 4:13 PM, Mohammad.R esmailzadeh \<  
[esmailzadeh@gmail.com](mailto:esmailzadeh@gmail.com)\> wrote:

> it is completely confusing for me why elasticsearch was configured for  
> large data by default instead of development and developers should find  
> these tiny tips under thousands of documentations.

I'm sorry you had a bad experience. I don't really have a good answer for  
you here: the right value for a particular setting depends on your usage of  
elasticsearch and while we strive at having good defaults, they can't  
always be right for everyone.

In case you missed it, there is a free book about elasticsearch (  
[Elasticsearch: The Definitive Guide [2.x] | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html))  
which you can read and dives you into how elasticsearch works and how to  
use it so that you don't have to crawl the reference API every time that  
you start using a new API.

--  
Adrien

--  
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/CAO5%3DkAgPajZ5Qn4\_RFnJ1Y6KxfAWg8i2d8C2u54OYe\_QgEss4w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAgPajZ5Qn4_RFnJ1Y6KxfAWg8i2d8C2u54OYe_QgEss4w%40mail.gmail.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:22am UTC](https://discuss.elastic.co/t/is--id-of-document-affects-on-scoring/23007/5 "2017-07-06T00:22:44Z")

</div>


