amazonka-cloudsearch-domains 0.3.4 → 0.3.5
raw patch · 3 files changed
+48/−6 lines, 3 filesdep ~amazonka-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: amazonka-core
API changes (from Hackage documentation)
+ Network.AWS.CloudSearchDomains.Types: hitExprs :: Lens' Hit (HashMap Text Text)
Files
- amazonka-cloudsearch-domains.cabal +2/−2
- gen/Network/AWS/CloudSearchDomains/Search.hs +33/−2
- gen/Network/AWS/CloudSearchDomains/Types.hs +13/−2
amazonka-cloudsearch-domains.cabal view
@@ -1,5 +1,5 @@ name: amazonka-cloudsearch-domains-version: 0.3.4+version: 0.3.5 synopsis: Amazon CloudSearch Domain SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense@@ -41,5 +41,5 @@ other-modules: build-depends:- amazonka-core == 0.3.4.*+ amazonka-core == 0.3.5.* , base >= 4.7 && < 5
gen/Network/AWS/CloudSearchDomains/Search.hs view
@@ -159,7 +159,14 @@ -- specify search or filter criteria. You can also specify expressions as return -- fields. ----- For more information about defining and using expressions, see <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html ConfiguringExpressions> in the /Amazon CloudSearch Developer Guide/.+-- You specify the expressions in JSON using the form '{"EXPRESSIONNAME":"EXPRESSION"}'. You can define and use multiple expressions in a search request. For+-- example:+--+-- ' {"expression1":"_score*rating", "expression2":"(1/rank)*year"} '+--+-- For information about the variables, operators, and functions you can use in+-- expressions, see <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions Writing Expressions> in the /Amazon CloudSearch Developer Guide/+-- . s1Expr :: Lens' Search (Maybe Text) s1Expr = lens _s1Expr (\s a -> s { _s1Expr = a }) @@ -188,6 +195,26 @@ -- values, the facets are sorted by facet count, and the top 10 facets are -- returned in the results. --+-- To count particular buckets of values, use the 'buckets' option. For example,+-- the following request uses the 'buckets' option to calculate and return facet+-- counts by decade.+--+-- '{"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}} '+--+-- To sort facets by facet count, use the 'count' option. For example, the+-- following request sets the 'sort' option to 'count' to sort the facet values by+-- facet count, with the facet values that have the most matching documents+-- listed first. Setting the 'size' option to 3 returns only the top three facet+-- values.+--+-- ' {"year":{"sort":"count","size":3}} '+--+-- To sort the facets by value, use the 'bucket' option. For example, the+-- following request sets the 'sort' option to 'bucket' to sort the facet values+-- numerically by year, with earliest year listed first.+--+-- ' {"year":{"sort":"bucket"}} '+-- -- For more information, see <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html Getting and Using Facet Information> in the /AmazonCloudSearch Developer Guide/. s1Facet :: Lens' Search (Maybe Text) s1Facet = lens _s1Facet (\s a -> s { _s1Facet = a })@@ -220,6 +247,10 @@ -- append to an occurrence of a search term. The default for HTML highlights is '</em>'. The default for text highlights is '*'. If no highlight options are -- specified for a field, the returned field text is treated as HTML and the -- first match is highlighted with emphasis tags: '<em>search-term</em>'.+--+-- For example, the following request retrieves highlights for the 'actors' and 'title' fields.+--+-- '{ "actors": {}, "title": {"format": "text","max_phrases": 2,"pre_tag": "","post_tag": ""} }' s1Highlight :: Lens' Search (Maybe Text) s1Highlight = lens _s1Highlight (\s a -> s { _s1Highlight = a }) @@ -248,7 +279,7 @@ s1Query = lens _s1Query (\s a -> s { _s1Query = a }) -- | Configures options for the query parser specified in the 'queryParser'--- parameter.+-- parameter. You specify the options in JSON using the following form '{"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"}.' -- -- The options you can configure vary according to which parser you use: --
gen/Network/AWS/CloudSearchDomains/Types.hs view
@@ -42,6 +42,7 @@ -- * Hit , Hit , hit+ , hitExprs , hitFields , hitHighlights , hitId@@ -213,7 +214,8 @@ toJSON = toJSONText data Hit = Hit- { _hitFields :: Map Text (List "fields" Text)+ { _hitExprs :: Map Text Text+ , _hitFields :: Map Text (List "fields" Text) , _hitHighlights :: Map Text Text , _hitId :: Maybe Text } deriving (Eq, Read, Show)@@ -222,6 +224,8 @@ -- -- The fields accessible through corresponding lenses are: --+-- * 'hitExprs' @::@ 'HashMap' 'Text' 'Text'+-- -- * 'hitFields' @::@ 'HashMap' 'Text' ['Text'] -- -- * 'hitHighlights' @::@ 'HashMap' 'Text' 'Text'@@ -232,9 +236,14 @@ hit = Hit { _hitId = Nothing , _hitFields = mempty+ , _hitExprs = mempty , _hitHighlights = mempty } +-- | The expressions returned from a document that matches the search request.+hitExprs :: Lens' Hit (HashMap Text Text)+hitExprs = lens _hitExprs (\s a -> s { _hitExprs = a }) . _Map+ -- | The fields returned from a document that matches the search request. hitFields :: Lens' Hit (HashMap Text [Text]) hitFields = lens _hitFields (\s a -> s { _hitFields = a }) . _Map@@ -249,7 +258,8 @@ instance FromJSON Hit where parseJSON = withObject "Hit" $ \o -> Hit- <$> o .:? "fields" .!= mempty+ <$> o .:? "exprs" .!= mempty+ <*> o .:? "fields" .!= mempty <*> o .:? "highlights" .!= mempty <*> o .:? "id" @@ -257,6 +267,7 @@ toJSON Hit{..} = object [ "id" .= _hitId , "fields" .= _hitFields+ , "exprs" .= _hitExprs , "highlights" .= _hitHighlights ]