Compare query with and without score calculation

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.

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