Open tsolbjor opened 5 years ago
When a BestBet term is added to the query for boosting at https://github.com/Epinova/Epinova.Elasticsearch/blob/4cc47efe9399aa505bff0c762027c3431dd36e39/src/Epinova.ElasticSearch.Core/Engine/QueryBuilder.cs#L292
a constraint is added to require the bestbet to be a hit: https://github.com/Epinova/Epinova.Elasticsearch/blob/4cc47efe9399aa505bff0c762027c3431dd36e39/src/Epinova.ElasticSearch.Core/Engine/QueryBuilder.cs#L429
All other hits to the main query is then filtered and only the BestBet is returned.
When setting request.Query.Bool.MinimumNumberShouldMatch = null; I get the expected result.
request.Query.Bool.MinimumNumberShouldMatch = null;
When a BestBet term is added to the query for boosting at https://github.com/Epinova/Epinova.Elasticsearch/blob/4cc47efe9399aa505bff0c762027c3431dd36e39/src/Epinova.ElasticSearch.Core/Engine/QueryBuilder.cs#L292
a constraint is added to require the bestbet to be a hit: https://github.com/Epinova/Epinova.Elasticsearch/blob/4cc47efe9399aa505bff0c762027c3431dd36e39/src/Epinova.ElasticSearch.Core/Engine/QueryBuilder.cs#L429
All other hits to the main query is then filtered and only the BestBet is returned.
When setting
request.Query.Bool.MinimumNumberShouldMatch = null;
I get the expected result.