mirror of
https://github.com/typeable/bloodhound.git
synced 2024-09-11 08:25:32 +03:00
Removed lower-case representation for auto fuzziness
This commit is contained in:
parent
7131ac8df4
commit
16320685d5
@ -9,12 +9,12 @@ module Database.V5.Bloodhound.Internal.Query
|
|||||||
|
|
||||||
import Bloodhound.Import
|
import Bloodhound.Import
|
||||||
|
|
||||||
import Data.Char (isNumber)
|
import Data.Char (isNumber)
|
||||||
import qualified Data.HashMap.Strict as HM
|
import qualified Data.HashMap.Strict as HM
|
||||||
import Data.List (nub)
|
import Data.List (nub)
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
|
||||||
import Database.Bloodhound.Common.Script as X
|
import Database.Bloodhound.Common.Script as X
|
||||||
import Database.V5.Bloodhound.Internal.Newtypes
|
import Database.V5.Bloodhound.Internal.Newtypes
|
||||||
|
|
||||||
data Query =
|
data Query =
|
||||||
@ -834,16 +834,16 @@ instance FromJSON DisMaxQuery where
|
|||||||
<*> o .:? "boost"
|
<*> o .:? "boost"
|
||||||
|
|
||||||
data MatchQuery = MatchQuery
|
data MatchQuery = MatchQuery
|
||||||
{ matchQueryField :: FieldName
|
{ matchQueryField :: FieldName
|
||||||
, matchQueryQueryString :: QueryString
|
, matchQueryQueryString :: QueryString
|
||||||
, matchQueryOperator :: BooleanOperator
|
, matchQueryOperator :: BooleanOperator
|
||||||
, matchQueryZeroTerms :: ZeroTermsQuery
|
, matchQueryZeroTerms :: ZeroTermsQuery
|
||||||
, matchQueryCutoffFrequency :: Maybe CutoffFrequency
|
, matchQueryCutoffFrequency :: Maybe CutoffFrequency
|
||||||
, matchQueryMatchType :: Maybe MatchQueryType
|
, matchQueryMatchType :: Maybe MatchQueryType
|
||||||
, matchQueryAnalyzer :: Maybe Analyzer
|
, matchQueryAnalyzer :: Maybe Analyzer
|
||||||
, matchQueryMaxExpansions :: Maybe MaxExpansions
|
, matchQueryMaxExpansions :: Maybe MaxExpansions
|
||||||
, matchQueryLenient :: Maybe Lenient
|
, matchQueryLenient :: Maybe Lenient
|
||||||
, matchQueryBoost :: Maybe Boost
|
, matchQueryBoost :: Maybe Boost
|
||||||
, matchQueryMinimumShouldMatch :: Maybe Text
|
, matchQueryMinimumShouldMatch :: Maybe Text
|
||||||
, matchQueryFuzziness :: Maybe Fuzziness
|
, matchQueryFuzziness :: Maybe Fuzziness
|
||||||
} deriving (Eq, Show)
|
} deriving (Eq, Show)
|
||||||
@ -1635,5 +1635,4 @@ instance ToJSON Fuzziness where
|
|||||||
|
|
||||||
instance FromJSON Fuzziness where
|
instance FromJSON Fuzziness where
|
||||||
parseJSON (String "AUTO") = return FuzzinessAuto
|
parseJSON (String "AUTO") = return FuzzinessAuto
|
||||||
parseJSON (String "auto") = return FuzzinessAuto
|
parseJSON v = Fuzziness <$> parseJSON v
|
||||||
parseJSON v = Fuzziness <$> parseJSON v
|
|
||||||
|
Loading…
Reference in New Issue
Block a user