# Index boosting

**URL:** <https://discuss.elastic.co/t/index-boosting/58116>\
**Category:** Elasticsearch\
**Created:** [August 16, 2016, 9:25am UTC](https://discuss.elastic.co/t/index-boosting/58116 "2016-08-16T09:25:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soorajhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soorajhere/32/8396_2.png) [@soorajhere](https://discuss.elastic.co/u/soorajhere)\
**Post date:** [August 16, 2016, 9:25am UTC](https://discuss.elastic.co/t/index-boosting/58116/1 "2016-08-16T09:25:15Z")

</div>

Hi All,

I am using Elastic search for indexing search data in my application. Its a .net web application a nd i use NEST API's for indexing and searching.

Currently there are around 10 million records indexed totally in around 14 indexes. During search i use multi match search and mention the field names from all the indexes in the query and i limit the search result from elastic search to 15.

Now i need to prioritize the search like for index1, priority1 and index 2- priority 3 like this. Since there are lot of data present and i cannot re-index it now. What is the best way to add a boost to existing index? or we need to use query time boosting as i read in ES website. But how to achieve this .  
Any help is really appreciated.

---

<div class="post-metadata">

**Author:** ![soorajhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soorajhere/32/8396_2.png) [@soorajhere](https://discuss.elastic.co/u/soorajhere)\
**Post date:** [August 23, 2016, 3:34pm UTC](https://discuss.elastic.co/t/index-boosting/58116/2 "2016-08-23T15:34:39Z")

</div>

Any help please

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 23, 2016, 3:38pm UTC](https://discuss.elastic.co/t/index-boosting/58116/3 "2016-08-23T15:38:20Z")

</div>

The REST API offers the option of per-index boosting: [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-index-boost.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-index-boost.html)

---

<div class="post-metadata">

**Author:** ![soorajhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soorajhere/32/8396_2.png) [@soorajhere](https://discuss.elastic.co/u/soorajhere)\
**Post date:** [August 23, 2016, 3:40pm UTC](https://discuss.elastic.co/t/index-boosting/58116/4 "2016-08-23T15:40:42Z")

</div>

Thanks Mark..

Do you have a sample query? I am not sure how to fire this query

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [August 23, 2016, 3:53pm UTC](https://discuss.elastic.co/t/index-boosting/58116/5 "2016-08-23T15:53:17Z")

</div>

> [@soorajhere](#):
>
> Do you have a sample query?

```
GET /test,test1/_search
{
   "query": {
	  "match": {
		 "foo": "bar"
	  }
   },
   "indices_boost": {
	  "test": 1,
	  "test1": 2.5
   }
}

```

I expect your next question though is "how do I do that in Nest?" but I'm not familiar with that client.

---

<div class="post-metadata">

**Author:** ![soorajhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soorajhere/32/8396_2.png) [@soorajhere](https://discuss.elastic.co/u/soorajhere)\
**Post date:** [September 8, 2016, 10:28am UTC](https://discuss.elastic.co/t/index-boosting/58116/6 "2016-09-08T10:28:04Z")

</div>

Mark:  
I expect your next question though is "how do I do that in Nest?" but I'm not familiar with that client.  
🙂 thanks a lot Mark....I actually use a raw query method in Nest, So this will do 🙂

---

<div class="post-metadata">

**Author:** ![soorajhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/soorajhere/32/8396_2.png) [@soorajhere](https://discuss.elastic.co/u/soorajhere)\
**Post date:** [December 21, 2016, 11:32am UTC](https://discuss.elastic.co/t/index-boosting/58116/7 "2016-12-21T11:32:04Z")

</div>

I tried the above method, but didnt get it correctly. Actually the problem is i am searching 14 indices together. In one of them, there are millions of records and in others there are only around 10 or 100 records. So whenever i fire a search query, i get lot of matching results from the index which has millions of records. So the other results i am unable to figure out if its present in search results.

Ideally i would like to see results from the REST API as first few from index2 and then index3 and rest of the results from index3 (which has millions of records).

---

<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 5, 2017, 10:04pm UTC](https://discuss.elastic.co/t/index-boosting/58116/8 "2017-07-05T22:04:44Z")

</div>


