bloodhound icon indicating copy to clipboard operation
bloodhound copied to clipboard

Inaccurate docs for MinimumMatch

Open andrewthad opened this issue 6 years ago • 0 comments

This is the definition of MinimumMatch, along with it's haddock comment:

{-| 'MinimumMatch' controls how many should clauses in the bool query should
     match. Can be an absolute value (2) or a percentage (30%) or a
     combination of both.
-}
newtype MinimumMatch =
  MinimumMatch Int deriving (Eq, Read, Show, Generic, ToJSON, FromJSON, Typeable)

It does not appear that we are actually able to distinguish between absolute values and percentages. Two possible solutions:

  1. Clarify in the comments that only absolute values are accepted.
  2. Turn MinimumMatch into a sum that gives users the choice. (breaking change)

I'm happy to do either of these.

andrewthad avatar Oct 10 '17 16:10 andrewthad