# Compare query with and without score calculation

**URL:** <https://discuss.elastic.co/t/compare-query-with-and-without-score-calculation/150402>\
**Category:** Elasticsearch\
**Created:** [September 29, 2018, 2:07am UTC](https://discuss.elastic.co/t/compare-query-with-and-without-score-calculation/150402 "2018-09-29T02:07:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrx/32/35028_2.png) [@andrx](https://discuss.elastic.co/u/andrx)\
**Post date:** [September 29, 2018, 2:07am UTC](https://discuss.elastic.co/t/compare-query-with-and-without-score-calculation/150402/1 "2018-09-29T02:07:03Z")

</div>

I would like to know if it is possible to disable score calculation for `should` types of queries or maybe it is possible to have an `OR` for filter context?

ES version: 6+

For example:

this query will search matches in either `records` _OR_ `voIds` and will have score calculation

```
POST customers/_search
{
  "size": 10000,
  "version": true,
  "query": {
	"bool": {
	  "should": [
		{
		  "terms": {
			"voIds": [
			  78031203, ...
			]
		  }
		},
		{
		  "terms": {
			"records.keyword": [
			  "S3G82U", ....
			]
		  }
		}
	  ]
	}
  }
}

```

this query will filter documents that match in both `records` _AND_ `voIds` and will not have score calculation. not what I need because it uses _AND_

```
POST customers/_search
{
  "size": 10000,
  "version": true,
  "query": {
	"bool": {
	  "filter": [
		{
		  "terms": {
			"voIds": [
			  78031203
			]
		  }
		},
		{
		  "terms": {
			"records.keyword": [
			  "S3G82U"
			]
		  }
		}
	  ]
	}
  }
}

```

The goal for me to troubleshoot performance of the same queries with and without score. So I have first query that has score. how to write second query without score?

Thanks.

---

<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:** [October 27, 2018, 2:07am UTC](https://discuss.elastic.co/t/compare-query-with-and-without-score-calculation/150402/2 "2018-10-27T02:07:12Z")

</div>

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