@@ -378,250 +378,53 @@ module Database.V1.Bloodhound.Types
378378 , EsPassword(..)
379379 ) where
380380
381−import Control.Applicative as A
382−import Control.Arrow (first)
381+import Control.Applicative as A
382+import Control.Arrow (first)
383383import Control.Monad.Catch
384384import Control.Monad.Except
385−import Control.Monad.Reader (MonadReader (..),
386− ReaderT (..))
387−import Control.Monad.State (MonadState)
388−import Control.Monad.Writer (MonadWriter)
385+import Control.Monad.Reader (MonadReader (..),
386+ ReaderT (..))
387+import Control.Monad.State (MonadState)
388+import Control.Monad.Writer (MonadWriter)
389389import Data.Aeson
390−import Data.Aeson.Types (Pair, Parser,
391− emptyObject,
392− parseEither, parseMaybe,
393− typeMismatch)
394−import qualified Data.ByteString.Lazy.Char8 as L
390+import Data.Aeson.Types (Pair, Parser,
391+ emptyObject,
392+ parseEither,
393+ parseMaybe,
394+ typeMismatch)
395+import qualified Data.ByteString.Lazy.Char8 as L
395396import Data.Char
396−import Data.Hashable (Hashable)
397−import qualified Data.HashMap.Strict as HM
398−import Data.List (foldl', intercalate,
399− nub)
400−import Data.List.NonEmpty (NonEmpty (..), toList)
401−import qualified Data.Map.Strict as M
397+import Data.Hashable (Hashable)
398+import qualified Data.HashMap.Strict as HM
399+import Data.List (foldl', intercalate,
400+ nub)
401+import Data.List.NonEmpty (NonEmpty (..), toList)
402+import qualified Data.Map.Strict as M
402403import Data.Maybe
403−import Data.Scientific (Scientific)
404+import Data.Scientific (Scientific)
404405import Data.Semigroup
405−import Data.Text (Text)
406−import qualified Data.Text as T
406+import Data.Text (Text)
407+import qualified Data.Text as T
407408import Data.Time.Calendar
408−import Data.Time.Clock (NominalDiffTime,
409− UTCTime)
409+import Data.Time.Clock (NominalDiffTime,
410+ UTCTime)
410411import Data.Time.Clock.POSIX
411−import qualified Data.Traversable as DT
412−import Data.Typeable (Typeable)
413−import qualified Data.Vector as V
414−import qualified Data.Version as Vers
412+import qualified Data.Traversable as DT
413+import Data.Typeable (Typeable)
414+import qualified Data.Vector as V
415+import qualified Data.Version as Vers
415416import GHC.Enum
416−import GHC.Generics (Generic)
417+import GHC.Generics (Generic)
417418import Network.HTTP.Client
418−import qualified Network.HTTP.Types.Method as NHTM
419−import qualified Text.ParserCombinators.ReadP as RP
420−import qualified Text.Read as TR
419+import qualified Network.HTTP.Types.Method as NHTM
420+import qualified Text.ParserCombinators.ReadP as RP
421+import qualified Text.Read as TR
421422
423+import Database.V1.Bloodhound.Internal.Client
422424import Database.V1.Bloodhound.Types.Class
423425import Database.V1.Bloodhound.Types.Internal
424426
425−-- $setup
426−-- >>> :set -XOverloadedStrings
427−-- >>> import Data.Aeson
428−-- >>> import Database.V1.Bloodhound
429−-- >>> let testServer = (Server "http://localhost:9200")
430−-- >>> let testIndex = IndexName "twitter"
431−-- >>> let testMapping = MappingName "tweet"
432−-- >>> let defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
433427
434−-- defaultIndexSettings is exported by Database.Bloodhound as well
435−-- no trailing slashes in servers, library handles building the path.
436−
437−-- | Create a 'BHEnv' with all optional fields defaulted. HTTP hook
438−-- will be a noop. You can use the exported fields to customize it further, e.g.:
439−--
440−-- >> (mkBHEnv myServer myManager) { bhRequestHook = customHook }
441−mkBHEnv :: Server -> Manager -> BHEnv
442−mkBHEnv s m = BHEnv s m return
443−
444−newtype BH m a = BH {
445− unBH :: ReaderT BHEnv m a
446− } deriving ( Functor
447− , A.Applicative
448− , Monad
449− , MonadIO
450− , MonadState s
451− , MonadWriter w
452− , MonadError e
453− , Alternative
454− , MonadPlus
455− , MonadFix
456− , MonadThrow
457− , MonadCatch
458− , MonadMask)
459−
460−instance MonadTrans BH where
461− lift = BH . lift
462−
463−instance (MonadReader r m) => MonadReader r (BH m) where
464− ask = lift ask
465− local f (BH (ReaderT m)) = BH $ ReaderT $ \r ->
466− local f (m r)
467−
468−instance (Functor m, Applicative m, MonadIO m) => MonadBH (BH m) where
469− getBHEnv = BH getBHEnv
470−
471−runBH :: BHEnv -> BH m a -> m a
472−runBH e f = runReaderT (unBH f) e
473−
474−{-| 'Version' is embedded in 'Status' -}
475−data Version = Version { number :: VersionNumber
476− , build_hash :: BuildHash
477− , build_timestamp :: UTCTime
478− , build_snapshot :: Bool
479− , lucene_version :: VersionNumber } deriving (Eq, Read, Show, Generic, Typeable)
480−
481−-- | Traditional software versioning number
482−newtype VersionNumber = VersionNumber { versionNumber :: Vers.Version
483− } deriving (Eq, Read, Show, Generic, Typeable, Ord)
484−
485−{-| 'Status' is a data type for describing the JSON body returned by
486− Elasticsearch when you query its status. This was deprecated in 1.2.0.
487−
488− <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-status.html#indices-status>
489−-}
490−
491−data Status = Status { ok :: Maybe Bool
492− , status :: Int
493− , name :: Text
494− , version :: Version
495− , tagline :: Text } deriving (Eq, Read, Show, Generic)
496−
497−{-| 'IndexSettings' is used to configure the shards and replicas when you create
498− an Elasticsearch Index.
499−
500− <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html>
501−-}
502−
503−data IndexSettings =
504− IndexSettings { indexShards :: ShardCount
505− , indexReplicas :: ReplicaCount } deriving (Eq, Read, Show, Generic, Typeable)
506−
507−{-| 'defaultIndexSettings' is an 'IndexSettings' with 3 shards and 2 replicas. -}
508−defaultIndexSettings :: IndexSettings
509−defaultIndexSettings = IndexSettings (ShardCount 3) (ReplicaCount 2)
510−
511−
512−{-| 'IndexOptimizationSettings' is used to configure index optimization. See
513− <https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-optimize.html>
514− for more info.
515−-}
516−data IndexOptimizationSettings =
517− IndexOptimizationSettings { maxNumSegments :: Maybe Int
518− -- ^ Number of segments to optimize to. 1 will fully optimize the index. If omitted, the default behavior is to only optimize if the server deems it necessary.
519− , onlyExpungeDeletes :: Bool
520− -- ^ Should the optimize process only expunge segments with deletes in them? If the purpose of the optimization is to free disk space, this should be set to True.
521− , flushAfterOptimize :: Bool
522− -- ^ Should a flush be performed after the optimize.
523− } deriving (Eq, Show, Generic, Typeable)
524−
525−
526−{-| 'defaultIndexOptimizationSettings' implements the default settings that
527− ElasticSearch uses for index optimization. 'maxNumSegments' is Nothing,
528− 'onlyExpungeDeletes' is False, and flushAfterOptimize is True.
529−-}
530−defaultIndexOptimizationSettings :: IndexOptimizationSettings
531−defaultIndexOptimizationSettings = IndexOptimizationSettings Nothing False True
532−
533−{-| 'UpdatableIndexSetting' are settings which may be updated after an index is created.
534−
535− <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>
536−-}
537−data UpdatableIndexSetting = NumberOfReplicas ReplicaCount
538− -- ^ The number of replicas each shard has.
539− | AutoExpandReplicas ReplicaBounds
540− | BlocksReadOnly Bool
541− -- ^ Set to True to have the index read only. False to allow writes and metadata changes.
542− | BlocksRead Bool
543− -- ^ Set to True to disable read operations against the index.
544− | BlocksWrite Bool
545− -- ^ Set to True to disable write operations against the index.
546− | BlocksMetaData Bool
547− -- ^ Set to True to disable metadata operations against the index.
548− | RefreshInterval NominalDiffTime
549− -- ^ The async refresh interval of a shard
550− | IndexConcurrency Int
551− | FailOnMergeFailure Bool
552− | TranslogFlushThresholdOps Int
553− -- ^ When to flush on operations.
554− | TranslogFlushThresholdSize Bytes
555− -- ^ When to flush based on translog (bytes) size.
556− | TranslogFlushThresholdPeriod NominalDiffTime
557− -- ^ When to flush based on a period of not flushing.
558− | TranslogDisableFlush Bool
559− -- ^ Disables flushing. Note, should be set for a short interval and then enabled.
560− | CacheFilterMaxSize (Maybe Bytes)
561− -- ^ The maximum size of filter cache (per segment in shard).
562− | CacheFilterExpire (Maybe NominalDiffTime)
563− -- ^ The expire after access time for filter cache.
564− | GatewaySnapshotInterval NominalDiffTime
565− -- ^ The gateway snapshot interval (only applies to shared gateways).
566− | RoutingAllocationInclude (NonEmpty NodeAttrFilter)
567− -- ^ A node matching any rule will be allowed to host shards from the index.
568− | RoutingAllocationExclude (NonEmpty NodeAttrFilter)
569− -- ^ A node matching any rule will NOT be allowed to host shards from the index.
570− | RoutingAllocationRequire (NonEmpty NodeAttrFilter)
571− -- ^ Only nodes matching all rules will be allowed to host shards from the index.
572− | RoutingAllocationEnable AllocationPolicy
573− -- ^ Enables shard allocation for a specific index.
574− | RoutingAllocationShardsPerNode ShardCount
575− -- ^ Controls the total number of shards (replicas and primaries) allowed to be allocated on a single node.
576− | RecoveryInitialShards InitialShardCount
577− -- ^ When using local gateway a particular shard is recovered only if there can be allocated quorum shards in the cluster.
578− | GCDeletes NominalDiffTime
579− | TTLDisablePurge Bool
580− -- ^ Disables temporarily the purge of expired docs.
581− | TranslogFSType FSType
582− | IndexCompoundFormat CompoundFormat
583− | IndexCompoundOnFlush Bool
584− | WarmerEnabled Bool
585− deriving (Eq, Show, Generic, Typeable)
586−
587−data AllocationPolicy = AllocAll
588− -- ^ Allows shard allocation for all shards.
589− | AllocPrimaries
590− -- ^ Allows shard allocation only for primary shards.
591− | AllocNewPrimaries
592− -- ^ Allows shard allocation only for primary shards for new indices.
593− | AllocNone
594− -- ^ No shard allocation is allowed
595− deriving (Eq, Read, Show, Generic, Typeable)
596−
597−data ReplicaBounds = ReplicasBounded Int Int
598− | ReplicasLowerBounded Int
599− | ReplicasUnbounded
600− deriving (Eq, Read, Show, Generic, Typeable)
601−
602−-- | A measure of bytes used for various configurations. You may want
603−-- to use smart constructors like 'gigabytes' for larger values.
604−--
605−-- >>> gigabytes 9
606−-- Bytes 9000000000
607−--
608−-- >>> megabytes 9
609−-- Bytes 9000000
610−--
611−-- >>> kilobytes 9
612−-- Bytes 9000
613−newtype Bytes = Bytes Int deriving (Eq, Read, Show, Generic, Typeable, Ord, ToJSON, FromJSON)
614−
615−gigabytes :: Int -> Bytes
616−gigabytes n = megabytes (1000 * n)
617−
618−
619−megabytes :: Int -> Bytes
620−megabytes n = kilobytes (1000 * n)
621−
622−
623−kilobytes :: Int -> Bytes
624−kilobytes n = Bytes (1000 * n)
625428
626429
627430data FSType = FSSimple
@@ -1739,13 +1542,6 @@ readMay s = case reads s of
17391542parseReadText :: Read a => Text -> Parser a
17401543parseReadText = maybe mzero return . readMay . T.unpack
17411544
1742−type Aggregations = M.Map Text Aggregation
1743−
1744−emptyAggregations :: Aggregations
1745−emptyAggregations = M.empty
1746−
1747−mkAggregations :: Text -> Aggregation -> Aggregations
1748−mkAggregations name aggregation = M.insert name aggregation emptyAggregations
17491545
17501546data TermOrder = TermOrder{ termSortField :: Text
17511547 , termSortOrder :: SortOrder } deriving (Eq, Read, Show, Generic, Typeable)
@@ -1778,62 +1574,6 @@ data Interval = Year
17781574 | Second
17791575 | FractionalInterval Float TimeInterval deriving (Eq, Read, Show, Generic, Typeable)
17801576
1781−data Aggregation = TermsAgg TermsAggregation
1782− | CardinalityAgg CardinalityAggregation
1783− | DateHistogramAgg DateHistogramAggregation
1784− | ValueCountAgg ValueCountAggregation
1785− | FilterAgg FilterAggregation
1786− | DateRangeAgg DateRangeAggregation
1787− | MissingAgg MissingAggregation
1788− | TopHitsAgg TopHitsAggregation
1789− deriving (Eq, Read, Show, Generic, Typeable)
1790−
1791−data TopHitsAggregation = TopHitsAggregation
1792− { taFrom :: Maybe From
1793− , taSize :: Maybe Size
1794− , taSort :: Maybe Sort
1795− } deriving (Eq, Read, Show)
1796−
1797−data MissingAggregation = MissingAggregation
1798− { maField :: Text
1799− } deriving (Eq, Read, Show, Generic, Typeable)
1800−
1801−data TermsAggregation = TermsAggregation { term :: Either Text Text
1802− , termInclude :: Maybe TermInclusion
1803− , termExclude :: Maybe TermInclusion
1804− , termOrder :: Maybe TermOrder
1805− , termMinDocCount :: Maybe Int
1806− , termSize :: Maybe Int
1807− , termShardSize :: Maybe Int
1808− , termCollectMode :: Maybe CollectionMode
1809− , termExecutionHint :: Maybe ExecutionHint
1810− , termAggs :: Maybe Aggregations
1811− } deriving (Eq, Read, Show, Generic, Typeable)
1812−
1813−data CardinalityAggregation = CardinalityAggregation { cardinalityField :: FieldName,
1814− precisionThreshold :: Maybe Int
1815− } deriving (Eq, Read, Show, Generic, Typeable)
1816−
1817−data DateHistogramAggregation = DateHistogramAggregation { dateField :: FieldName
1818− , dateInterval :: Interval
1819− , dateFormat :: Maybe Text
1820− -- pre and post deprecated in 1.5
1821− , datePreZone :: Maybe Text
1822− , datePostZone :: Maybe Text
1823− , datePreOffset :: Maybe Text
1824− , datePostOffset :: Maybe Text
1825− , dateAggs :: Maybe Aggregations
1826− } deriving (Eq, Read, Show, Generic, Typeable)
1827−
1828−
1829−data DateRangeAggregation = DateRangeAggregation { draField :: FieldName
1830− , draFormat :: Maybe Text
1831− , draRanges :: NonEmpty DateRangeAggRange
1832− } deriving (Eq, Read, Show, Generic, Typeable)
1833−
1834−data DateRangeAggRange = DateRangeFrom DateMathExpr
1835− | DateRangeTo DateMathExpr
1836− | DateRangeFromAndTo DateMathExpr DateMathExpr deriving (Eq, Read, Show, Generic, Typeable)
18371577
18381578-- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math> for more information.
18391579data DateMathExpr = DateMathExpr DateMathAnchor [DateMathModifier] deriving (Eq, Read, Show, Generic, Typeable)
@@ -1855,26 +1595,6 @@ data DateMathUnit = DMYear
18551595 | DMMinute
18561596 | DMSecond deriving (Eq, Read, Show, Generic, Typeable)
18571597
1858−-- | See <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-valuecount-aggregation.html> for more information.
1859−data ValueCountAggregation = FieldValueCount FieldName
1860− | ScriptValueCount Script deriving (Eq, Read, Show, Generic, Typeable)
1861−
1862−-- | Single-bucket filter aggregations. See <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filter-aggregation.html#search-aggregations-bucket-filter-aggregation> for more information.
1863−data FilterAggregation = FilterAggregation { faFilter :: Filter
1864− , faAggs :: Maybe Aggregations} deriving (Eq, Read, Show, Generic, Typeable)
1865−
1866−mkTermsAggregation :: Text -> TermsAggregation
1867−mkTermsAggregation t = TermsAggregation (Left t) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
1868−
1869−mkTermsScriptAggregation :: Text -> TermsAggregation
1870−mkTermsScriptAggregation t = TermsAggregation (Right t) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
1871−
1872−mkDateHistogram :: FieldName -> Interval -> DateHistogramAggregation
1873−mkDateHistogram t i = DateHistogramAggregation t i Nothing Nothing Nothing Nothing Nothing Nothing
1874−
1875−mkCardinalityAggregation :: FieldName -> CardinalityAggregation
1876−mkCardinalityAggregation t = CardinalityAggregation t Nothing
1877−
18781598instance ToJSON Version where
18791599 toJSON Version {..} = object ["number" .= number
18801600 ,"build_hash" .= build_hash
@@ -1950,56 +1670,6 @@ instance Read TimeInterval where
19501670 f 's' = return Seconds
19511671 f _ = fail "TimeInterval expected one of w, d, h, m, s"
19521672
1953−instance ToJSON Aggregation where
1954− toJSON (TermsAgg (TermsAggregation term include exclude order minDocCount size shardSize collectMode executionHint termAggs)) =
1955− omitNulls ["terms" .= omitNulls [ toJSON' term,
1956− "include" .= include,
1957− "exclude" .= exclude,
1958− "order" .= order,
1959− "min_doc_count" .= minDocCount,
1960− "size" .= size,
1961− "shard_size" .= shardSize,
1962− "collect_mode" .= collectMode,
1963− "execution_hint" .= executionHint
1964− ],
1965− "aggs" .= termAggs ]
1966− where
1967− toJSON' x = case x of { Left y -> "field" .= y; Right y -> "script" .= y }
1968−
1969− toJSON (CardinalityAgg (CardinalityAggregation field precisionThreshold)) =
1970− object ["cardinality" .= omitNulls [ "field" .= field,
1971− "precisionThreshold" .= precisionThreshold
1972− ]
1973− ]
1974−
1975− toJSON (DateHistogramAgg (DateHistogramAggregation field interval format preZone postZone preOffset postOffset dateHistoAggs)) =
1976− omitNulls ["date_histogram" .= omitNulls [ "field" .= field,
1977− "interval" .= interval,
1978− "format" .= format,
1979− "pre_zone" .= preZone,
1980− "post_zone" .= postZone,
1981− "pre_offset" .= preOffset,
1982− "post_offset" .= postOffset
1983− ],
1984− "aggs" .= dateHistoAggs ]
1985− toJSON (ValueCountAgg a) = object ["value_count" .= v]
1986− where v = case a of
1987− (FieldValueCount (FieldName n)) -> object ["field" .= n]
1988− (ScriptValueCount (Script s)) -> object ["script" .= s]
1989− toJSON (FilterAgg (FilterAggregation filt ags)) =
1990− omitNulls [ "filter" .= filt
1991− , "aggs" .= ags]
1992− toJSON (DateRangeAgg a) = object [ "date_range" .= a
1993− ]
1994− toJSON (MissingAgg (MissingAggregation{..})) =
1995− object ["missing" .= object ["field" .= maField]]
1996−
1997− toJSON (TopHitsAgg (TopHitsAggregation mfrom msize msort)) =
1998− omitNulls ["top_hits" .= omitNulls [ "size" .= msize
1999− , "from" .= mfrom
2000− , "sort" .= msort
2001− ]
2002− ]
20031673
20041674instance ToJSON DateRangeAggregation where
20051675 toJSON DateRangeAggregation {..} =
@@ -5358,7 +5028,7 @@ instance FromJSON Suggest where
53585028 let dropTextList = HM.toList $ HM.filterWithKey (\x _ -> x /= "text") o
53595029 suggestName' <- case dropTextList of
53605030 [(x, _)] -> return x
5361− _ -> fail "error parsing Suggest field name"
5031+ _ -> fail "error parsing Suggest field name"
53625032 suggestType' <- o .: suggestName'
53635033 return $ Suggest suggestText' suggestName' suggestType'
53645034 parseJSON x = typeMismatch "Suggest" x
@@ -5428,7 +5098,7 @@ mkPhraseSuggester fName =
54285098 Nothing Nothing Nothing Nothing []
54295099
54305100data PhraseSuggesterHighlighter =
5431− PhraseSuggesterHighlighter { phraseSuggesterHighlighterPreTag :: Text
5101+ PhraseSuggesterHighlighter { phraseSuggesterHighlighterPreTag :: Text
54325102 , phraseSuggesterHighlighterPostTag :: Text
54335103 }
54345104 deriving (Show, Generic, Eq, Read, Typeable)
@@ -5469,9 +5139,9 @@ instance FromJSON PhraseSuggesterCollate where
54695139 parseJSON x = typeMismatch "PhraseSuggesterCollate" x
54705140
54715141data SuggestOptions =
5472− SuggestOptions { suggestOptionsText :: Text
5473− , suggestOptionsScore :: Double
5474− , suggestOptionsFreq :: Maybe Int
5142+ SuggestOptions { suggestOptionsText :: Text
5143+ , suggestOptionsScore :: Double
5144+ , suggestOptionsFreq :: Maybe Int
54755145 , suggestOptionsHighlighted :: Maybe Text
54765146 }
54775147 deriving (Eq, Read, Show)
@@ -5485,9 +5155,9 @@ instance FromJSON SuggestOptions where
54855155 <*> o .:? "highlighted"
54865156
54875157data SuggestResponse =
5488− SuggestResponse { suggestResponseText :: Text
5489− , suggestResponseOffset :: Int
5490− , suggestResponseLength :: Int
5158+ SuggestResponse { suggestResponseText :: Text
5159+ , suggestResponseOffset :: Int
5160+ , suggestResponseLength :: Int
54915161 , suggestResponseOptions :: [SuggestOptions]
54925162 }
54935163 deriving (Eq, Read, Show)
@@ -5501,7 +5171,7 @@ instance FromJSON SuggestResponse where
55015171 <*> o .: "options"
55025172
55035173data NamedSuggestionResponse =
5504− NamedSuggestionResponse { nsrName :: Text
5174+ NamedSuggestionResponse { nsrName :: Text
55055175 , nsrResponses :: [SuggestResponse]
55065176 }
55075177 deriving (Eq, Read, Show)
@@ -5524,7 +5194,7 @@ data DirectGeneratorSuggestModeTypes = DirectGeneratorSuggestModeMissing
55245194instance ToJSON DirectGeneratorSuggestModeTypes where
55255195 toJSON DirectGeneratorSuggestModeMissing = "missing"
55265196 toJSON DirectGeneratorSuggestModePopular = "popular"
5527− toJSON DirectGeneratorSuggestModeAlways = "always"
5197+ toJSON DirectGeneratorSuggestModeAlways = "always"
55285198
55295199instance FromJSON DirectGeneratorSuggestModeTypes where
55305200 parseJSON = withText "DirectGeneratorSuggestModeTypes" parse
@@ -5534,17 +5204,17 @@ instance FromJSON DirectGeneratorSuggestModeTypes where
55345204 parse f = fail ("Unexpected DirectGeneratorSuggestModeTypes: " <> show f)
55355205
55365206data DirectGenerators = DirectGenerators
5537− { directGeneratorsField :: FieldName
5538− , directGeneratorsSize :: Maybe Int
5539− , directGeneratorSuggestMode :: DirectGeneratorSuggestModeTypes
5540− , directGeneratorMaxEdits :: Maybe Double
5541− , directGeneratorPrefixLength :: Maybe Int
5542− , directGeneratorMinWordLength :: Maybe Int
5207+ { directGeneratorsField :: FieldName
5208+ , directGeneratorsSize :: Maybe Int
5209+ , directGeneratorSuggestMode :: DirectGeneratorSuggestModeTypes
5210+ , directGeneratorMaxEdits :: Maybe Double
5211+ , directGeneratorPrefixLength :: Maybe Int
5212+ , directGeneratorMinWordLength :: Maybe Int
55435213 , directGeneratorMaxInspections :: Maybe Int
5544− , directGeneratorMinDocFreq :: Maybe Double
5545− , directGeneratorMaxTermFreq :: Maybe Double
5546− , directGeneratorPreFilter :: Maybe Text
5547− , directGeneratorPostFilter :: Maybe Text
5214+ , directGeneratorMinDocFreq :: Maybe Double
5215+ , directGeneratorMaxTermFreq :: Maybe Double
5216+ , directGeneratorPreFilter :: Maybe Text
5217+ , directGeneratorPostFilter :: Maybe Text
55485218 }
55495219 deriving (Show, Eq, Read, Generic, Typeable)
55505220
@@ -5579,4 +5249,4 @@ instance FromJSON DirectGenerators where
55795249 <*> o .:? "post_filter"
55805250
55815251mkDirectGenerators :: FieldName -> DirectGenerators
5582−mkDirectGenerators fn = DirectGenerators fn Nothing DirectGeneratorSuggestModeMissing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
5252+mkDirectGenerators fn = DirectGenerators fn Nothing DirectGeneratorSuggestModeMissing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing