SERVER-138746Backlog

Multikey NDV estimate fast path ignores bounds

The [current|https://github.com/10gen/mongo/blob/dcf40f818e329ae5e2a9a34654345eac74bb67d3/src/mongo/db/query/compiler/ce/sampling/sampling_estimator_impl.cpp#L957] logic reads: ie. if all the matching keys in the sample are unique, we avoid Newton-Raphson, instead returning the estimated total number of index keys. Instead we should return the estimated number of _matching_ index keys. Noticed while working on SERVER-134637.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
cbr_ce_accuracy