Epinova.Elasticsearch
Epinova.Elasticsearch copied to clipboard
When .UseBestBets() - and search for a BestBet term - only the BestBet item is returned
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.