-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Amazon CloudSearch Domain SDK.
--   
--   The types from this library are intended to be used with
--   <a>amazonka</a>, which provides mechanisms for specifying AuthN/AuthZ
--   information, sending requests, and receiving responses.
--   
--   Lenses are used for constructing and manipulating types, due to the
--   depth of nesting of AWS types and transparency regarding
--   de/serialisation into more palatable Haskell values. The provided
--   lenses should be compatible with any of the major lens libraries such
--   as <a>lens</a> or <a>lens-family-core</a>.
--   
--   See <a>Network.AWS.CloudSearchDomains</a> or <a>the AWS
--   documentation</a> to get started.
@package amazonka-cloudsearch-domains
@version 1.4.5


module Network.AWS.CloudSearchDomains.Types

-- | API version <tt>2013-01-01</tt> of the Amazon CloudSearch Domain SDK
--   configuration.
cloudSearchDomains :: Service

-- | Information about any problems encountered while processing an upload
--   request.
_DocumentServiceException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Information about any problems encountered while processing a search
--   request.
_SearchException :: AsError a => Getting (First ServiceError) a ServiceError
data ContentType
ApplicationJSON :: ContentType
ApplicationXML :: ContentType
data QueryParser
Dismax :: QueryParser
Lucene :: QueryParser
Simple :: QueryParser
Structured :: QueryParser

-- | A container for facet information.
--   
--   <i>See:</i> <a>bucket</a> smart constructor.
data Bucket

-- | Creates a value of <a>Bucket</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bValue</a> - The facet value being counted.</li>
--   <li><a>bCount</a> - The number of hits that contain the facet value in
--   the specified facet field.</li>
--   </ul>
bucket :: Bucket

-- | The facet value being counted.
bValue :: Lens' Bucket (Maybe Text)

-- | The number of hits that contain the facet value in the specified facet
--   field.
bCount :: Lens' Bucket (Maybe Integer)

-- | A container for the calculated facet values and counts.
--   
--   <i>See:</i> <a>bucketInfo</a> smart constructor.
data BucketInfo

-- | Creates a value of <a>BucketInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>biBuckets</a> - A list of the calculated facet values and
--   counts.</li>
--   </ul>
bucketInfo :: BucketInfo

-- | A list of the calculated facet values and counts.
biBuckets :: Lens' BucketInfo [Bucket]

-- | A warning returned by the document service when an issue is discovered
--   while processing an upload request.
--   
--   <i>See:</i> <a>documentServiceWarning</a> smart constructor.
data DocumentServiceWarning

-- | Creates a value of <a>DocumentServiceWarning</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dswMessage</a> - The description for a warning returned by the
--   document service.</li>
--   </ul>
documentServiceWarning :: DocumentServiceWarning

-- | The description for a warning returned by the document service.
dswMessage :: Lens' DocumentServiceWarning (Maybe Text)

-- | The statistics for a field calculated in the request.
--   
--   <i>See:</i> <a>fieldStats</a> smart constructor.
data FieldStats

-- | Creates a value of <a>FieldStats</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>fsMax</a> - The maximum value found in the specified field in
--   the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>max</tt> is the string representation of a double-precision 64-bit
--   floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>max</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsMean</a> - The average of the values found in the specified
--   field in the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>mean</tt> is the string representation of a double-precision
--   64-bit floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>mean</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsCount</a> - The number of documents that contain a value in
--   the specified field in the result set.</li>
--   <li><a>fsMissing</a> - The number of documents that do not contain a
--   value in the specified field in the result set.</li>
--   <li><a>fsStddev</a> - The standard deviation of the values in the
--   specified field in the result set.</li>
--   <li><a>fsMin</a> - The minimum value found in the specified field in
--   the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>min</tt> is the string representation of a double-precision 64-bit
--   floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>min</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsSumOfSquares</a> - The sum of all field values in the result
--   set squared.</li>
--   <li><a>fsSum</a> - The sum of the field values across the documents in
--   the result set. <tt>null</tt> for date fields.</li>
--   </ul>
fieldStats :: FieldStats

-- | The maximum value found in the specified field in the result set. If
--   the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>max</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>max</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMax :: Lens' FieldStats (Maybe Text)

-- | The average of the values found in the specified field in the result
--   set. If the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>mean</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>mean</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMean :: Lens' FieldStats (Maybe Text)

-- | The number of documents that contain a value in the specified field in
--   the result set.
fsCount :: Lens' FieldStats (Maybe Integer)

-- | The number of documents that do not contain a value in the specified
--   field in the result set.
fsMissing :: Lens' FieldStats (Maybe Integer)

-- | The standard deviation of the values in the specified field in the
--   result set.
fsStddev :: Lens' FieldStats (Maybe Double)

-- | The minimum value found in the specified field in the result set. If
--   the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>min</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>min</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMin :: Lens' FieldStats (Maybe Text)

-- | The sum of all field values in the result set squared.
fsSumOfSquares :: Lens' FieldStats (Maybe Double)

-- | The sum of the field values across the documents in the result set.
--   <tt>null</tt> for date fields.
fsSum :: Lens' FieldStats (Maybe Double)

-- | Information about a document that matches the search request.
--   
--   <i>See:</i> <a>hit</a> smart constructor.
data Hit

-- | Creates a value of <a>Hit</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>hitExprs</a> - The expressions returned from a document that
--   matches the search request.</li>
--   <li><a>hitId</a> - The document ID of a document that matches the
--   search request.</li>
--   <li><a>hitHighlights</a> - The highlights returned from a document
--   that matches the search request.</li>
--   <li><a>hitFields</a> - The fields returned from a document that
--   matches the search request.</li>
--   </ul>
hit :: Hit

-- | The expressions returned from a document that matches the search
--   request.
hitExprs :: Lens' Hit (HashMap Text Text)

-- | The document ID of a document that matches the search request.
hitId :: Lens' Hit (Maybe Text)

-- | The highlights returned from a document that matches the search
--   request.
hitHighlights :: Lens' Hit (HashMap Text Text)

-- | The fields returned from a document that matches the search request.
hitFields :: Lens' Hit (HashMap Text [Text])

-- | The collection of documents that match the search request.
--   
--   <i>See:</i> <a>hits</a> smart constructor.
data Hits

-- | Creates a value of <a>Hits</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>hCursor</a> - A cursor that can be used to retrieve the next
--   set of matching documents when you want to page through a large result
--   set.</li>
--   <li><a>hHit</a> - A document that matches the search request.</li>
--   <li><a>hStart</a> - The index of the first matching document.</li>
--   <li><a>hFound</a> - The total number of documents that match the
--   search request.</li>
--   </ul>
hits :: Hits

-- | A cursor that can be used to retrieve the next set of matching
--   documents when you want to page through a large result set.
hCursor :: Lens' Hits (Maybe Text)

-- | A document that matches the search request.
hHit :: Lens' Hits [Hit]

-- | The index of the first matching document.
hStart :: Lens' Hits (Maybe Integer)

-- | The total number of documents that match the search request.
hFound :: Lens' Hits (Maybe Integer)

-- | Contains the resource id (<tt>rid</tt> ) and the time it took to
--   process the request (<tt>timems</tt> ).
--   
--   <i>See:</i> <a>searchStatus</a> smart constructor.
data SearchStatus

-- | Creates a value of <a>SearchStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sRid</a> - The encrypted resource ID for the request.</li>
--   <li><a>sTimems</a> - How long it took to process the request, in
--   milliseconds.</li>
--   </ul>
searchStatus :: SearchStatus

-- | The encrypted resource ID for the request.
sRid :: Lens' SearchStatus (Maybe Text)

-- | How long it took to process the request, in milliseconds.
sTimems :: Lens' SearchStatus (Maybe Integer)

-- | Container for the suggestion information returned in a
--   <tt>SuggestResponse</tt> .
--   
--   <i>See:</i> <a>suggestModel</a> smart constructor.
data SuggestModel

-- | Creates a value of <a>SuggestModel</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>smFound</a> - The number of documents that were found to match
--   the query string.</li>
--   <li><a>smSuggestions</a> - The documents that match the query
--   string.</li>
--   <li><a>smQuery</a> - The query string specified in the suggest
--   request.</li>
--   </ul>
suggestModel :: SuggestModel

-- | The number of documents that were found to match the query string.
smFound :: Lens' SuggestModel (Maybe Integer)

-- | The documents that match the query string.
smSuggestions :: Lens' SuggestModel [SuggestionMatch]

-- | The query string specified in the suggest request.
smQuery :: Lens' SuggestModel (Maybe Text)

-- | Contains the resource id (<tt>rid</tt> ) and the time it took to
--   process the request (<tt>timems</tt> ).
--   
--   <i>See:</i> <a>suggestStatus</a> smart constructor.
data SuggestStatus

-- | Creates a value of <a>SuggestStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ssRid</a> - The encrypted resource ID for the request.</li>
--   <li><a>ssTimems</a> - How long it took to process the request, in
--   milliseconds.</li>
--   </ul>
suggestStatus :: SuggestStatus

-- | The encrypted resource ID for the request.
ssRid :: Lens' SuggestStatus (Maybe Text)

-- | How long it took to process the request, in milliseconds.
ssTimems :: Lens' SuggestStatus (Maybe Integer)

-- | An autocomplete suggestion that matches the query string specified in
--   a <tt>SuggestRequest</tt> .
--   
--   <i>See:</i> <a>suggestionMatch</a> smart constructor.
data SuggestionMatch

-- | Creates a value of <a>SuggestionMatch</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>smSuggestion</a> - The string that matches the query string
--   specified in the <tt>SuggestRequest</tt> .</li>
--   <li><a>smScore</a> - The relevance score of a suggested match.</li>
--   <li><a>smId</a> - The document ID of the suggested document.</li>
--   </ul>
suggestionMatch :: SuggestionMatch

-- | The string that matches the query string specified in the
--   <tt>SuggestRequest</tt> .
smSuggestion :: Lens' SuggestionMatch (Maybe Text)

-- | The relevance score of a suggested match.
smScore :: Lens' SuggestionMatch (Maybe Integer)

-- | The document ID of the suggested document.
smId :: Lens' SuggestionMatch (Maybe Text)


-- | Posts a batch of documents to a search domain for indexing. A document
--   batch is a collection of add and delete operations that represent the
--   documents you want to add, update, or delete from your domain. Batches
--   can be described in either JSON or XML. Each item that you want Amazon
--   CloudSearch to return as a search result (such as a product) is
--   represented as a document. Every document has a unique ID and one or
--   more fields that contain the data that you want to search and return
--   in results. Individual documents cannot contain more than 1 MB of
--   data. The entire batch cannot exceed 5 MB. To get the best possible
--   upload performance, group add and delete operations in batches that
--   are close the 5 MB limit. Submitting a large volume of single-document
--   batches can overload a domain's document service.
--   
--   The endpoint for submitting <tt>UploadDocuments</tt> requests is
--   domain-specific. To get the document endpoint for your domain, use the
--   Amazon CloudSearch configuration service <tt>DescribeDomains</tt>
--   action. A domain's endpoints are also displayed on the domain
--   dashboard in the Amazon CloudSearch console.
--   
--   For more information about formatting your data for Amazon
--   CloudSearch, see <a>Preparing Your Data</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> . For more information about uploading
--   data for indexing, see <a>Uploading Data</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .
module Network.AWS.CloudSearchDomains.UploadDocuments

-- | Creates a value of <a>UploadDocuments</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>udContentType</a> - The format of the batch you are uploading.
--   Amazon CloudSearch supports two document batch formats: *
--   application<i>json * application</i>xml</li>
--   <li><a>udDocuments</a> - A batch of documents formatted in JSON or
--   HTML.</li>
--   </ul>
uploadDocuments :: ContentType -> HashedBody -> UploadDocuments

-- | Container for the parameters to the <tt>UploadDocuments</tt> request.
--   
--   <i>See:</i> <a>uploadDocuments</a> smart constructor.
data UploadDocuments

-- | The format of the batch you are uploading. Amazon CloudSearch supports
--   two document batch formats: * application<i>json * application</i>xml
udContentType :: Lens' UploadDocuments ContentType

-- | A batch of documents formatted in JSON or HTML.
udDocuments :: Lens' UploadDocuments HashedBody

-- | Creates a value of <a>UploadDocumentsResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>udrsStatus</a> - The status of an
--   <tt>UploadDocumentsRequest</tt> .</li>
--   <li><a>udrsAdds</a> - The number of documents that were added to the
--   search domain.</li>
--   <li><a>udrsWarnings</a> - Any warnings returned by the document
--   service about the documents being uploaded.</li>
--   <li><a>udrsDeletes</a> - The number of documents that were deleted
--   from the search domain.</li>
--   <li><a>udrsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
uploadDocumentsResponse :: Int -> UploadDocumentsResponse

-- | Contains the response to an <tt>UploadDocuments</tt> request.
--   
--   <i>See:</i> <a>uploadDocumentsResponse</a> smart constructor.
data UploadDocumentsResponse

-- | The status of an <tt>UploadDocumentsRequest</tt> .
udrsStatus :: Lens' UploadDocumentsResponse (Maybe Text)

-- | The number of documents that were added to the search domain.
udrsAdds :: Lens' UploadDocumentsResponse (Maybe Integer)

-- | Any warnings returned by the document service about the documents
--   being uploaded.
udrsWarnings :: Lens' UploadDocumentsResponse [DocumentServiceWarning]

-- | The number of documents that were deleted from the search domain.
udrsDeletes :: Lens' UploadDocumentsResponse (Maybe Integer)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
udrsResponseStatus :: Lens' UploadDocumentsResponse Int
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse
instance Data.Data.Data Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse
instance GHC.Show.Show Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse
instance GHC.Read.Read Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse
instance GHC.Classes.Eq Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance GHC.Show.Show Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Network.AWS.Types.AWSRequest Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Network.AWS.Data.Body.ToBody Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Network.AWS.Data.Path.ToPath Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocuments
instance Control.DeepSeq.NFData Network.AWS.CloudSearchDomains.UploadDocuments.UploadDocumentsResponse


module Network.AWS.CloudSearchDomains.Waiters


-- | Retrieves autocomplete suggestions for a partial query string. You can
--   use suggestions enable you to display likely matches before users
--   finish typing. In Amazon CloudSearch, suggestions are based on the
--   contents of a particular text field. When you request suggestions,
--   Amazon CloudSearch finds all of the documents whose values in the
--   suggester field start with the specified query string. The beginning
--   of the field must match the query string to be considered a match.
--   
--   For more information about configuring suggesters and retrieving
--   suggestions, see <a>Getting Suggestions</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .
--   
--   The endpoint for submitting <tt>Suggest</tt> requests is
--   domain-specific. You submit suggest requests to a domain's search
--   endpoint. To get the search endpoint for your domain, use the Amazon
--   CloudSearch configuration service <tt>DescribeDomains</tt> action. A
--   domain's endpoints are also displayed on the domain dashboard in the
--   Amazon CloudSearch console.
module Network.AWS.CloudSearchDomains.Suggest

-- | Creates a value of <a>Suggest</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sSize</a> - Specifies the maximum number of suggestions to
--   return.</li>
--   <li><a>sQuery</a> - Specifies the string for which you want to get
--   suggestions.</li>
--   <li><a>sSuggester</a> - Specifies the name of the suggester to use to
--   find suggested matches.</li>
--   </ul>
suggest :: Text -> Text -> Suggest

-- | Container for the parameters to the <tt>Suggest</tt> request.
--   
--   <i>See:</i> <a>suggest</a> smart constructor.
data Suggest

-- | Specifies the maximum number of suggestions to return.
sSize :: Lens' Suggest (Maybe Integer)

-- | Specifies the string for which you want to get suggestions.
sQuery :: Lens' Suggest Text

-- | Specifies the name of the suggester to use to find suggested matches.
sSuggester :: Lens' Suggest Text

-- | Creates a value of <a>SuggestResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>srsSuggest</a> - Container for the matching search suggestion
--   information.</li>
--   <li><a>srsStatus</a> - The status of a <tt>SuggestRequest</tt> .
--   Contains the resource ID (<tt>rid</tt> ) and how long it took to
--   process the request (<tt>timems</tt> ).</li>
--   <li><a>srsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
suggestResponse :: Int -> SuggestResponse

-- | Contains the response to a <tt>Suggest</tt> request.
--   
--   <i>See:</i> <a>suggestResponse</a> smart constructor.
data SuggestResponse

-- | Container for the matching search suggestion information.
srsSuggest :: Lens' SuggestResponse (Maybe SuggestModel)

-- | The status of a <tt>SuggestRequest</tt> . Contains the resource ID
--   (<tt>rid</tt> ) and how long it took to process the request
--   (<tt>timems</tt> ).
srsStatus :: Lens' SuggestResponse (Maybe SuggestStatus)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
srsResponseStatus :: Lens' SuggestResponse Int
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.Suggest.SuggestResponse
instance Data.Data.Data Network.AWS.CloudSearchDomains.Suggest.SuggestResponse
instance GHC.Show.Show Network.AWS.CloudSearchDomains.Suggest.SuggestResponse
instance GHC.Read.Read Network.AWS.CloudSearchDomains.Suggest.SuggestResponse
instance GHC.Classes.Eq Network.AWS.CloudSearchDomains.Suggest.SuggestResponse
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Data.Data.Data Network.AWS.CloudSearchDomains.Suggest.Suggest
instance GHC.Show.Show Network.AWS.CloudSearchDomains.Suggest.Suggest
instance GHC.Read.Read Network.AWS.CloudSearchDomains.Suggest.Suggest
instance GHC.Classes.Eq Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Network.AWS.Types.AWSRequest Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Data.Hashable.Class.Hashable Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Control.DeepSeq.NFData Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Network.AWS.Data.Path.ToPath Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudSearchDomains.Suggest.Suggest
instance Control.DeepSeq.NFData Network.AWS.CloudSearchDomains.Suggest.SuggestResponse


-- | Retrieves a list of documents that match the specified search
--   criteria. How you specify the search criteria depends on which query
--   parser you use. Amazon CloudSearch supports four query parsers:
--   
--   <ul>
--   <li><tt>simple</tt> : search all <tt>text</tt> and <tt>text-array</tt>
--   fields for the specified string. Search for phrases, individual terms,
--   and prefixes. * <tt>structured</tt> : search specific fields,
--   construct compound queries using Boolean operators, and use advanced
--   features such as term boosting and proximity searching. *
--   <tt>lucene</tt> : specify search criteria using the Apache Lucene
--   query parser syntax. * <tt>dismax</tt> : specify search criteria using
--   the simplified subset of the Apache Lucene query parser syntax defined
--   by the DisMax query parser.</li>
--   </ul>
--   
--   For more information, see <a>Searching Your Data</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .
--   
--   The endpoint for submitting <tt>Search</tt> requests is
--   domain-specific. You submit search requests to a domain's search
--   endpoint. To get the search endpoint for your domain, use the Amazon
--   CloudSearch configuration service <tt>DescribeDomains</tt> action. A
--   domain's endpoints are also displayed on the domain dashboard in the
--   Amazon CloudSearch console.
module Network.AWS.CloudSearchDomains.Search

-- | Creates a value of <a>Search</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>seaExpr</a> - Defines one or more numeric expressions that can
--   be used to sort results or specify search or filter criteria. You can
--   also specify expressions as return fields. You specify the expressions
--   in JSON using the form
--   <tt>{<a>EXPRESSIONNAME</a>:<a>EXPRESSION</a>}</tt> . You can define
--   and use multiple expressions in a search request. For example:
--   <tt>{"expression1":"_score*rating", "expression2":"(1/rank)*year"}
--   </tt> For information about the variables, operators, and functions
--   you can use in expressions, see <a>Writing Expressions</a> in the
--   <i>Amazon CloudSearch Developer Guide</i> .</li>
--   <li><a>seaCursor</a> - Retrieves a cursor value you can use to page
--   through large result sets. Use the <tt>size</tt> parameter to control
--   the number of hits to include in each response. You can specify either
--   the <tt>cursor</tt> or <tt>start</tt> parameter in a request; they are
--   mutually exclusive. To get the first cursor, set the cursor value to
--   <tt>initial</tt> . In subsequent requests, specify the cursor value
--   returned in the hits section of the response. For more information,
--   see <a>Paginating Results</a> in the <i>Amazon CloudSearch Developer
--   Guide</i> .</li>
--   <li><a>seaReturn</a> - Specifies the field and expression values to
--   include in the response. Multiple fields or expressions are specified
--   as a comma-separated list. By default, a search response includes all
--   return enabled fields (<tt>_all_fields</tt> ). To return only the
--   document IDs for the matching documents, specify <tt>_no_fields</tt> .
--   To retrieve the relevance score calculated for each document, specify
--   <tt>_score</tt> .</li>
--   <li><a>seaQueryOptions</a> - Configures options for the query parser
--   specified in the <tt>queryParser</tt> parameter. You specify the
--   options in JSON using the following form
--   <tt>{<a>OPTION1</a>:<a>VALUE1</a>,<a>OPTION2</a>:VALUE2"...<a>OPTIONN</a>:<a>VALUEN</a>}.</tt>
--   The options you can configure vary according to which parser you use:
--   * <tt>defaultOperator</tt> : The default operator used to combine
--   individual terms in the search string. For example:
--   <tt>defaultOperator: <a>or</a></tt> . For the <tt>dismax</tt> parser,
--   you specify a percentage that represents the percentage of terms in
--   the search string (rounded down) that must match, rather than a
--   default operator. A value of <tt>0%</tt> is the equivalent to OR, and
--   a value of <tt>100%</tt> is equivalent to AND. The percentage must be
--   specified as a value in the range 0-100 followed by the percent (%)
--   symbol. For example, <tt>defaultOperator: 50%</tt> . Valid values:
--   <tt>and</tt> , <tt>or</tt> , a percentage in the range 0%-100%
--   (<tt>dismax</tt> ). Default: <tt>and</tt> (<tt>simple</tt> ,
--   <tt>structured</tt> , <tt>lucene</tt> ) or <tt>100</tt>
--   (<tt>dismax</tt> ). Valid for: <tt>simple</tt> , <tt>structured</tt> ,
--   <tt>lucene</tt> , and <tt>dismax</tt> . * <tt>fields</tt> : An array
--   of the fields to search when no fields are specified in a search. If
--   no fields are specified in a search and this option is not specified,
--   all text and text-array fields are searched. You can specify a weight
--   for each field to control the relative importance of each field when
--   Amazon CloudSearch calculates relevance scores. To specify a field
--   weight, append a caret (<tt>^</tt> ) symbol and the weight to the
--   field name. For example, to boost the importance of the <tt>title</tt>
--   field over the <tt>description</tt> field you could specify:
--   <tt>"fields":["title^5","description"]</tt> . Valid values: The name
--   of any configured field and an optional numeric value greater than
--   zero. Default: All <tt>text</tt> and <tt>text-array</tt> fields. Valid
--   for: <tt>simple</tt> , <tt>structured</tt> , <tt>lucene</tt> , and
--   <tt>dismax</tt> . * <tt>operators</tt> : An array of the operators or
--   special characters you want to disable for the simple query parser. If
--   you disable the <tt>and</tt> , <tt>or</tt> , or <tt>not</tt>
--   operators, the corresponding operators (<tt>+</tt> , <tt>|</tt> ,
--   <tt>-</tt> ) have no special meaning and are dropped from the search
--   string. Similarly, disabling <tt>prefix</tt> disables the wildcard
--   operator (<tt>*</tt> ) and disabling <tt>phrase</tt> disables the
--   ability to search for phrases by enclosing phrases in double quotes.
--   Disabling precedence disables the ability to control order of
--   precedence using parentheses. Disabling <tt>near</tt> disables the
--   ability to use the ~ operator to perform a sloppy phrase search.
--   Disabling the <tt>fuzzy</tt> operator disables the ability to use the
--   ~ operator to perform a fuzzy search. <tt>escape</tt> disables the
--   ability to use a backslash (<tt>@ ) to escape special characters
--   within the search string. Disabling whitespace is an advanced option
--   that prevents the parser from tokenizing on whitespace, which can be
--   useful for Vietnamese. (It prevents Vietnamese words from being split
--   incorrectly.) For example, you could disable all operators other than
--   the phrase operator to support just simple term and phrase queries:
--   </tt>"operators":["and","not","or", "prefix"]<tt> . Valid values:
--   </tt>and<tt> , </tt>escape<tt> , </tt>fuzzy<tt> , </tt>near<tt> ,
--   </tt>not<tt> , </tt>or<tt> , </tt>phrase<tt> , </tt>precedence<tt> ,
--   </tt>prefix<tt> , </tt>whitespace<tt> . Default: All operators and
--   special characters are enabled. Valid for: </tt>simple<tt> . *
--   </tt>phraseFields<tt> : An array of the </tt>text<tt> or
--   </tt>text-array<tt> fields you want to use for phrase searches. When
--   the terms in the search string appear in close proximity within a
--   field, the field scores higher. You can specify a weight for each
--   field to boost that score. The </tt>phraseSlop<tt> option controls how
--   much the matches can deviate from the search string and still be
--   boosted. To specify a field weight, append a caret (</tt>^<tt> )
--   symbol and the weight to the field name. For example, to boost phrase
--   matches in the </tt>title<tt> field over the </tt>abstract<tt> field,
--   you could specify: </tt>"phraseFields":["title^3", "plot"]<tt> Valid
--   values: The name of any </tt>text<tt> or </tt>text-array<tt> field and
--   an optional numeric value greater than zero. Default: No fields. If
--   you don't specify any fields with </tt>phraseFields<tt> , proximity
--   scoring is disabled even if </tt>phraseSlop<tt> is specified. Valid
--   for: </tt>dismax<tt> . * </tt>phraseSlop<tt> : An integer value that
--   specifies how much matches can deviate from the search phrase and
--   still be boosted according to the weights specified in the
--   </tt>phraseFields<tt> option; for example, </tt>phraseSlop: 2<tt> .
--   You must also specify </tt>phraseFields<tt> to enable proximity
--   scoring. Valid values: positive integers. Default: 0. Valid for:
--   </tt>dismax<tt> . * </tt>explicitPhraseSlop<tt> : An integer value
--   that specifies how much a match can deviate from the search phrase
--   when the phrase is enclosed in double quotes in the search string.
--   (Phrases that exceed this proximity distance are not considered a
--   match.) For example, to specify a slop of three for dismax phrase
--   queries, you would specify </tt>"explicitPhraseSlop":3<tt> . Valid
--   values: positive integers. Default: 0. Valid for: </tt>dismax<tt> . *
--   </tt>tieBreaker<tt> : When a term in the search string is found in a
--   document's field, a score is calculated for that field based on how
--   common the word is in that field compared to other documents. If the
--   term occurs in multiple fields within a document, by default only the
--   highest scoring field contributes to the document's overall score. You
--   can specify a </tt>tieBreaker<tt> value to enable the matches in
--   lower-scoring fields to contribute to the document's score. That way,
--   if two documents have the same max field score for a particular term,
--   the score for the document that has matches in more fields will be
--   higher. The formula for calculating the score with a tieBreaker is
--   </tt>(max field score) + (tieBreaker) * (sum of the scores for the
--   rest of the matching fields)<tt> . Set </tt>tieBreaker<tt> to 0 to
--   disregard all but the highest scoring field (pure max):
--   </tt>"tieBreaker":0<tt> . Set to 1 to sum the scores from all fields
--   (pure sum): </tt>"tieBreaker":1<tt> . Valid values: 0.0 to 1.0.
--   Default: 0.0. Valid for: </tt>dismax@ .</li>
--   <li><a>seaFilterQuery</a> - Specifies a structured query that filters
--   the results of a search without affecting how the results are scored
--   and sorted. You use <tt>filterQuery</tt> in conjunction with the
--   <tt>query</tt> parameter to filter the documents that match the
--   constraints specified in the <tt>query</tt> parameter. Specifying a
--   filter controls only which matching documents are included in the
--   results, it has no effect on how they are scored and sorted. The
--   <tt>filterQuery</tt> parameter supports the full structured query
--   syntax. For more information about using filters, see <a>Filtering
--   Matching Documents</a> in the <i>Amazon CloudSearch Developer
--   Guide</i> .</li>
--   <li><a>seaSize</a> - Specifies the maximum number of search hits to
--   include in the response.</li>
--   <li><a>seaQueryParser</a> - Specifies which query parser to use to
--   process the request. If <tt>queryParser</tt> is not specified, Amazon
--   CloudSearch uses the <tt>simple</tt> query parser. Amazon CloudSearch
--   supports four query parsers: * <tt>simple</tt> : perform simple
--   searches of <tt>text</tt> and <tt>text-array</tt> fields. By default,
--   the <tt>simple</tt> query parser searches all <tt>text</tt> and
--   <tt>text-array</tt> fields. You can specify which fields to search by
--   with the <tt>queryOptions</tt> parameter. If you prefix a search term
--   with a plus sign (+) documents must contain the term to be considered
--   a match. (This is the default, unless you configure the default
--   operator with the <tt>queryOptions</tt> parameter.) You can use the
--   <tt>-</tt> (NOT), <tt>|</tt> (OR), and <tt>*</tt> (wildcard) operators
--   to exclude particular terms, find results that match any of the
--   specified terms, or search for a prefix. To search for a phrase rather
--   than individual terms, enclose the phrase in double quotes. For more
--   information, see <a>Searching for Text</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> . * <tt>structured</tt> : perform
--   advanced searches by combining multiple expressions to define the
--   search criteria. You can also search within particular fields, search
--   for values and ranges of values, and use advanced options such as term
--   boosting, <tt>matchall</tt> , and <tt>near</tt> . For more
--   information, see <a>Constructing Compound Queries</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> . * <tt>lucene</tt> : search using the
--   Apache Lucene query parser syntax. For more information, see <a>Apache
--   Lucene Query Parser Syntax</a> . * <tt>dismax</tt> : search using the
--   simplified subset of the Apache Lucene query parser syntax defined by
--   the DisMax query parser. For more information, see <a>DisMax Query
--   Parser Syntax</a> .</li>
--   <li><a>seaStart</a> - Specifies the offset of the first search hit you
--   want to return. Note that the result set is zero-based; the first
--   result is at index 0. You can specify either the <tt>start</tt> or
--   <tt>cursor</tt> parameter in a request, they are mutually exclusive.
--   For more information, see <a>Paginating Results</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .</li>
--   <li><a>seaHighlight</a> - Retrieves highlights for matches in the
--   specified <tt>text</tt> or <tt>text-array</tt> fields. Each specified
--   field must be highlight enabled in the domain configuration. The
--   fields and options are specified in JSON using the form
--   <tt>{<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION:</a>STRING"},<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION</a>:<a>STRING</a>}}</tt>
--   . You can specify the following highlight options: * <tt>format</tt> :
--   specifies the format of the data in the text field: <tt>text</tt> or
--   <tt>html</tt> . When data is returned as HTML, all non-alphanumeric
--   characters are encoded. The default is <tt>html</tt> . *
--   <tt>max_phrases</tt> : specifies the maximum number of occurrences of
--   the search term(s) you want to highlight. By default, the first
--   occurrence is highlighted. * <tt>pre_tag</tt> : specifies the string
--   to prepend to an occurrence of a search term. The default for HTML
--   highlights is <tt>&amp;lt;em&amp;gt;</tt> . The default for text
--   highlights is <tt>*</tt> . * <tt>post_tag</tt> : specifies the string
--   to append to an occurrence of a search term. The default for HTML
--   highlights is <tt>&amp;lt;/em&amp;gt;</tt> . The default for text
--   highlights is <tt>*</tt> . 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:
--   <tt>&amp;lt;em&gt;search-term&amp;lt;/em&amp;gt;</tt> . For example,
--   the following request retrieves highlights for the <tt>actors</tt> and
--   <tt>title</tt> fields. <tt>{ "actors": {}, "title": {"format":
--   "text","max_phrases": 2,"pre_tag": "<b>","post_tag": "</b> "}
--   }</tt></li>
--   <li><a>seaStats</a> - Specifies one or more fields for which to get
--   statistics information. Each specified field must be facet-enabled in
--   the domain configuration. The fields are specified in JSON using the
--   form: <tt>{<a>FIELD-A</a>:{},<a>FIELD-B</a>:{}}</tt> There are
--   currently no options supported for statistics.</li>
--   <li><a>seaSort</a> - Specifies the fields or custom expressions to use
--   to sort the search results. Multiple fields or expressions are
--   specified as a comma-separated list. You must specify the sort
--   direction (<tt>asc</tt> or <tt>desc</tt> ) for each field; for
--   example, <tt>year desc,title asc</tt> . To use a field to sort
--   results, the field must be sort-enabled in the domain configuration.
--   Array type fields cannot be used for sorting. If no <tt>sort</tt>
--   parameter is specified, results are sorted by their default relevance
--   scores in descending order: <tt>_score desc</tt> . You can also sort
--   by document ID (<tt>_id asc</tt> ) and version (<tt>_version desc</tt>
--   ). For more information, see <a>Sorting Results</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .</li>
--   <li><a>seaFacet</a> - Specifies one or more fields for which to get
--   facet information, and options that control how the facet information
--   is returned. Each specified field must be facet-enabled in the domain
--   configuration. The fields and options are specified in JSON using the
--   form
--   <tt>{<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION:</a>STRING"},<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION</a>:<a>STRING</a>}}</tt>
--   . You can specify the following faceting options: * <tt>buckets</tt>
--   specifies an array of the facet values or ranges to count. Ranges are
--   specified using the same syntax that you use to search for a range of
--   values. For more information, see <a>Searching for a Range of
--   Values</a> in the <i>Amazon CloudSearch Developer Guide</i> . Buckets
--   are returned in the order they are specified in the request. The
--   <tt>sort</tt> and <tt>size</tt> options are not valid if you specify
--   <tt>buckets</tt> . * <tt>size</tt> specifies the maximum number of
--   facets to include in the results. By default, Amazon CloudSearch
--   returns counts for the top 10. The <tt>size</tt> parameter is only
--   valid when you specify the <tt>sort</tt> option; it cannot be used in
--   conjunction with <tt>buckets</tt> . * <tt>sort</tt> specifies how you
--   want to sort the facets in the results: <tt>bucket</tt> or
--   <tt>count</tt> . Specify <tt>bucket</tt> to sort alphabetically or
--   numerically by facet value (in ascending order). Specify
--   <tt>count</tt> to sort by the facet counts computed for each facet
--   value (in descending order). To retrieve facet counts for particular
--   values or ranges of values, use the <tt>buckets</tt> option instead of
--   <tt>sort</tt> . If no facet options are specified, facet counts are
--   computed for all field 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 <tt>buckets</tt> option. For example, the
--   following request uses the <tt>buckets</tt> option to calculate and
--   return facet counts by decade.
--   <tt>{"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}}
--   </tt> To sort facets by facet count, use the <tt>count</tt> option.
--   For example, the following request sets the <tt>sort</tt> option to
--   <tt>count</tt> to sort the facet values by facet count, with the facet
--   values that have the most matching documents listed first. Setting the
--   <tt>size</tt> option to 3 returns only the top three facet values.
--   <tt>{"year":{"sort":"count","size":3}} </tt> To sort the facets by
--   value, use the <tt>bucket</tt> option. For example, the following
--   request sets the <tt>sort</tt> option to <tt>bucket</tt> to sort the
--   facet values numerically by year, with earliest year listed first.
--   <tt>{"year":{"sort":"bucket"}} </tt> For more information, see
--   <a>Getting and Using Facet Information</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .</li>
--   <li><a>seaPartial</a> - Enables partial results to be returned if one
--   or more index partitions are unavailable. When your search index is
--   partitioned across multiple search instances, by default Amazon
--   CloudSearch only returns results if every partition can be queried.
--   This means that the failure of a single search instance can result in
--   5xx (internal server) errors. When you enable partial results, Amazon
--   CloudSearch returns whatever results are available and includes the
--   percentage of documents searched in the search results
--   (percent-searched). This enables you to more gracefully degrade your
--   users' search experience. For example, rather than displaying no
--   results, you could display the partial results and a message
--   indicating that the results might be incomplete due to a temporary
--   system outage.</li>
--   <li><a>seaQuery</a> - Specifies the search criteria for the request.
--   How you specify the search criteria depends on the query parser used
--   for the request and the parser options specified in the
--   <tt>queryOptions</tt> parameter. By default, the <tt>simple</tt> query
--   parser is used to process requests. To use the <tt>structured</tt> ,
--   <tt>lucene</tt> , or <tt>dismax</tt> query parser, you must also
--   specify the <tt>queryParser</tt> parameter. For more information about
--   specifying search criteria, see <a>Searching Your Data</a> in the
--   <i>Amazon CloudSearch Developer Guide</i> .</li>
--   </ul>
search :: Text -> Search

-- | Container for the parameters to the <tt>Search</tt> request.
--   
--   <i>See:</i> <a>search</a> smart constructor.
data Search

-- | Defines one or more numeric expressions that can be used to sort
--   results or specify search or filter criteria. You can also specify
--   expressions as return fields. You specify the expressions in JSON
--   using the form <tt>{<a>EXPRESSIONNAME</a>:<a>EXPRESSION</a>}</tt> .
--   You can define and use multiple expressions in a search request. For
--   example: <tt>{"expression1":"_score*rating",
--   "expression2":"(1/rank)*year"} </tt> For information about the
--   variables, operators, and functions you can use in expressions, see
--   <a>Writing Expressions</a> in the <i>Amazon CloudSearch Developer
--   Guide</i> .
seaExpr :: Lens' Search (Maybe Text)

-- | Retrieves a cursor value you can use to page through large result
--   sets. Use the <tt>size</tt> parameter to control the number of hits to
--   include in each response. You can specify either the <tt>cursor</tt>
--   or <tt>start</tt> parameter in a request; they are mutually exclusive.
--   To get the first cursor, set the cursor value to <tt>initial</tt> . In
--   subsequent requests, specify the cursor value returned in the hits
--   section of the response. For more information, see <a>Paginating
--   Results</a> in the <i>Amazon CloudSearch Developer Guide</i> .
seaCursor :: Lens' Search (Maybe Text)

-- | Specifies the field and expression values to include in the response.
--   Multiple fields or expressions are specified as a comma-separated
--   list. By default, a search response includes all return enabled fields
--   (<tt>_all_fields</tt> ). To return only the document IDs for the
--   matching documents, specify <tt>_no_fields</tt> . To retrieve the
--   relevance score calculated for each document, specify <tt>_score</tt>
--   .
seaReturn :: Lens' Search (Maybe Text)

-- | Configures options for the query parser specified in the
--   <tt>queryParser</tt> parameter. You specify the options in JSON using
--   the following form
--   <tt>{<a>OPTION1</a>:<a>VALUE1</a>,<a>OPTION2</a>:VALUE2"...<a>OPTIONN</a>:<a>VALUEN</a>}.</tt>
--   The options you can configure vary according to which parser you use:
--   * <tt>defaultOperator</tt> : The default operator used to combine
--   individual terms in the search string. For example:
--   <tt>defaultOperator: <a>or</a></tt> . For the <tt>dismax</tt> parser,
--   you specify a percentage that represents the percentage of terms in
--   the search string (rounded down) that must match, rather than a
--   default operator. A value of <tt>0%</tt> is the equivalent to OR, and
--   a value of <tt>100%</tt> is equivalent to AND. The percentage must be
--   specified as a value in the range 0-100 followed by the percent (%)
--   symbol. For example, <tt>defaultOperator: 50%</tt> . Valid values:
--   <tt>and</tt> , <tt>or</tt> , a percentage in the range 0%-100%
--   (<tt>dismax</tt> ). Default: <tt>and</tt> (<tt>simple</tt> ,
--   <tt>structured</tt> , <tt>lucene</tt> ) or <tt>100</tt>
--   (<tt>dismax</tt> ). Valid for: <tt>simple</tt> , <tt>structured</tt> ,
--   <tt>lucene</tt> , and <tt>dismax</tt> . * <tt>fields</tt> : An array
--   of the fields to search when no fields are specified in a search. If
--   no fields are specified in a search and this option is not specified,
--   all text and text-array fields are searched. You can specify a weight
--   for each field to control the relative importance of each field when
--   Amazon CloudSearch calculates relevance scores. To specify a field
--   weight, append a caret (<tt>^</tt> ) symbol and the weight to the
--   field name. For example, to boost the importance of the <tt>title</tt>
--   field over the <tt>description</tt> field you could specify:
--   <tt>"fields":["title^5","description"]</tt> . Valid values: The name
--   of any configured field and an optional numeric value greater than
--   zero. Default: All <tt>text</tt> and <tt>text-array</tt> fields. Valid
--   for: <tt>simple</tt> , <tt>structured</tt> , <tt>lucene</tt> , and
--   <tt>dismax</tt> . * <tt>operators</tt> : An array of the operators or
--   special characters you want to disable for the simple query parser. If
--   you disable the <tt>and</tt> , <tt>or</tt> , or <tt>not</tt>
--   operators, the corresponding operators (<tt>+</tt> , <tt>|</tt> ,
--   <tt>-</tt> ) have no special meaning and are dropped from the search
--   string. Similarly, disabling <tt>prefix</tt> disables the wildcard
--   operator (<tt>*</tt> ) and disabling <tt>phrase</tt> disables the
--   ability to search for phrases by enclosing phrases in double quotes.
--   Disabling precedence disables the ability to control order of
--   precedence using parentheses. Disabling <tt>near</tt> disables the
--   ability to use the ~ operator to perform a sloppy phrase search.
--   Disabling the <tt>fuzzy</tt> operator disables the ability to use the
--   ~ operator to perform a fuzzy search. <tt>escape</tt> disables the
--   ability to use a backslash (<tt>@ ) to escape special characters
--   within the search string. Disabling whitespace is an advanced option
--   that prevents the parser from tokenizing on whitespace, which can be
--   useful for Vietnamese. (It prevents Vietnamese words from being split
--   incorrectly.) For example, you could disable all operators other than
--   the phrase operator to support just simple term and phrase queries:
--   </tt>"operators":["and","not","or", "prefix"]<tt> . Valid values:
--   </tt>and<tt> , </tt>escape<tt> , </tt>fuzzy<tt> , </tt>near<tt> ,
--   </tt>not<tt> , </tt>or<tt> , </tt>phrase<tt> , </tt>precedence<tt> ,
--   </tt>prefix<tt> , </tt>whitespace<tt> . Default: All operators and
--   special characters are enabled. Valid for: </tt>simple<tt> . *
--   </tt>phraseFields<tt> : An array of the </tt>text<tt> or
--   </tt>text-array<tt> fields you want to use for phrase searches. When
--   the terms in the search string appear in close proximity within a
--   field, the field scores higher. You can specify a weight for each
--   field to boost that score. The </tt>phraseSlop<tt> option controls how
--   much the matches can deviate from the search string and still be
--   boosted. To specify a field weight, append a caret (</tt>^<tt> )
--   symbol and the weight to the field name. For example, to boost phrase
--   matches in the </tt>title<tt> field over the </tt>abstract<tt> field,
--   you could specify: </tt>"phraseFields":["title^3", "plot"]<tt> Valid
--   values: The name of any </tt>text<tt> or </tt>text-array<tt> field and
--   an optional numeric value greater than zero. Default: No fields. If
--   you don't specify any fields with </tt>phraseFields<tt> , proximity
--   scoring is disabled even if </tt>phraseSlop<tt> is specified. Valid
--   for: </tt>dismax<tt> . * </tt>phraseSlop<tt> : An integer value that
--   specifies how much matches can deviate from the search phrase and
--   still be boosted according to the weights specified in the
--   </tt>phraseFields<tt> option; for example, </tt>phraseSlop: 2<tt> .
--   You must also specify </tt>phraseFields<tt> to enable proximity
--   scoring. Valid values: positive integers. Default: 0. Valid for:
--   </tt>dismax<tt> . * </tt>explicitPhraseSlop<tt> : An integer value
--   that specifies how much a match can deviate from the search phrase
--   when the phrase is enclosed in double quotes in the search string.
--   (Phrases that exceed this proximity distance are not considered a
--   match.) For example, to specify a slop of three for dismax phrase
--   queries, you would specify </tt>"explicitPhraseSlop":3<tt> . Valid
--   values: positive integers. Default: 0. Valid for: </tt>dismax<tt> . *
--   </tt>tieBreaker<tt> : When a term in the search string is found in a
--   document's field, a score is calculated for that field based on how
--   common the word is in that field compared to other documents. If the
--   term occurs in multiple fields within a document, by default only the
--   highest scoring field contributes to the document's overall score. You
--   can specify a </tt>tieBreaker<tt> value to enable the matches in
--   lower-scoring fields to contribute to the document's score. That way,
--   if two documents have the same max field score for a particular term,
--   the score for the document that has matches in more fields will be
--   higher. The formula for calculating the score with a tieBreaker is
--   </tt>(max field score) + (tieBreaker) * (sum of the scores for the
--   rest of the matching fields)<tt> . Set </tt>tieBreaker<tt> to 0 to
--   disregard all but the highest scoring field (pure max):
--   </tt>"tieBreaker":0<tt> . Set to 1 to sum the scores from all fields
--   (pure sum): </tt>"tieBreaker":1<tt> . Valid values: 0.0 to 1.0.
--   Default: 0.0. Valid for: </tt>dismax@ .
seaQueryOptions :: Lens' Search (Maybe Text)

-- | Specifies a structured query that filters the results of a search
--   without affecting how the results are scored and sorted. You use
--   <tt>filterQuery</tt> in conjunction with the <tt>query</tt> parameter
--   to filter the documents that match the constraints specified in the
--   <tt>query</tt> parameter. Specifying a filter controls only which
--   matching documents are included in the results, it has no effect on
--   how they are scored and sorted. The <tt>filterQuery</tt> parameter
--   supports the full structured query syntax. For more information about
--   using filters, see <a>Filtering Matching Documents</a> in the
--   <i>Amazon CloudSearch Developer Guide</i> .
seaFilterQuery :: Lens' Search (Maybe Text)

-- | Specifies the maximum number of search hits to include in the
--   response.
seaSize :: Lens' Search (Maybe Integer)

-- | Specifies which query parser to use to process the request. If
--   <tt>queryParser</tt> is not specified, Amazon CloudSearch uses the
--   <tt>simple</tt> query parser. Amazon CloudSearch supports four query
--   parsers: * <tt>simple</tt> : perform simple searches of <tt>text</tt>
--   and <tt>text-array</tt> fields. By default, the <tt>simple</tt> query
--   parser searches all <tt>text</tt> and <tt>text-array</tt> fields. You
--   can specify which fields to search by with the <tt>queryOptions</tt>
--   parameter. If you prefix a search term with a plus sign (+) documents
--   must contain the term to be considered a match. (This is the default,
--   unless you configure the default operator with the
--   <tt>queryOptions</tt> parameter.) You can use the <tt>-</tt> (NOT),
--   <tt>|</tt> (OR), and <tt>*</tt> (wildcard) operators to exclude
--   particular terms, find results that match any of the specified terms,
--   or search for a prefix. To search for a phrase rather than individual
--   terms, enclose the phrase in double quotes. For more information, see
--   <a>Searching for Text</a> in the <i>Amazon CloudSearch Developer
--   Guide</i> . * <tt>structured</tt> : perform advanced searches by
--   combining multiple expressions to define the search criteria. You can
--   also search within particular fields, search for values and ranges of
--   values, and use advanced options such as term boosting,
--   <tt>matchall</tt> , and <tt>near</tt> . For more information, see
--   <a>Constructing Compound Queries</a> in the <i>Amazon CloudSearch
--   Developer Guide</i> . * <tt>lucene</tt> : search using the Apache
--   Lucene query parser syntax. For more information, see <a>Apache Lucene
--   Query Parser Syntax</a> . * <tt>dismax</tt> : search using the
--   simplified subset of the Apache Lucene query parser syntax defined by
--   the DisMax query parser. For more information, see <a>DisMax Query
--   Parser Syntax</a> .
seaQueryParser :: Lens' Search (Maybe QueryParser)

-- | Specifies the offset of the first search hit you want to return. Note
--   that the result set is zero-based; the first result is at index 0. You
--   can specify either the <tt>start</tt> or <tt>cursor</tt> parameter in
--   a request, they are mutually exclusive. For more information, see
--   <a>Paginating Results</a> in the <i>Amazon CloudSearch Developer
--   Guide</i> .
seaStart :: Lens' Search (Maybe Integer)

-- | Retrieves highlights for matches in the specified <tt>text</tt> or
--   <tt>text-array</tt> fields. Each specified field must be highlight
--   enabled in the domain configuration. The fields and options are
--   specified in JSON using the form
--   <tt>{<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION:</a>STRING"},<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION</a>:<a>STRING</a>}}</tt>
--   . You can specify the following highlight options: * <tt>format</tt> :
--   specifies the format of the data in the text field: <tt>text</tt> or
--   <tt>html</tt> . When data is returned as HTML, all non-alphanumeric
--   characters are encoded. The default is <tt>html</tt> . *
--   <tt>max_phrases</tt> : specifies the maximum number of occurrences of
--   the search term(s) you want to highlight. By default, the first
--   occurrence is highlighted. * <tt>pre_tag</tt> : specifies the string
--   to prepend to an occurrence of a search term. The default for HTML
--   highlights is <tt>&amp;lt;em&amp;gt;</tt> . The default for text
--   highlights is <tt>*</tt> . * <tt>post_tag</tt> : specifies the string
--   to append to an occurrence of a search term. The default for HTML
--   highlights is <tt>&amp;lt;/em&amp;gt;</tt> . The default for text
--   highlights is <tt>*</tt> . 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:
--   <tt>&amp;lt;em&gt;search-term&amp;lt;/em&amp;gt;</tt> . For example,
--   the following request retrieves highlights for the <tt>actors</tt> and
--   <tt>title</tt> fields. <tt>{ "actors": {}, "title": {"format":
--   "text","max_phrases": 2,"pre_tag": "<b>","post_tag": "</b> "} }</tt>
seaHighlight :: Lens' Search (Maybe Text)

-- | Specifies one or more fields for which to get statistics information.
--   Each specified field must be facet-enabled in the domain
--   configuration. The fields are specified in JSON using the form:
--   <tt>{<a>FIELD-A</a>:{},<a>FIELD-B</a>:{}}</tt> There are currently no
--   options supported for statistics.
seaStats :: Lens' Search (Maybe Text)

-- | Specifies the fields or custom expressions to use to sort the search
--   results. Multiple fields or expressions are specified as a
--   comma-separated list. You must specify the sort direction
--   (<tt>asc</tt> or <tt>desc</tt> ) for each field; for example, <tt>year
--   desc,title asc</tt> . To use a field to sort results, the field must
--   be sort-enabled in the domain configuration. Array type fields cannot
--   be used for sorting. If no <tt>sort</tt> parameter is specified,
--   results are sorted by their default relevance scores in descending
--   order: <tt>_score desc</tt> . You can also sort by document ID
--   (<tt>_id asc</tt> ) and version (<tt>_version desc</tt> ). For more
--   information, see <a>Sorting Results</a> in the <i>Amazon CloudSearch
--   Developer Guide</i> .
seaSort :: Lens' Search (Maybe Text)

-- | Specifies one or more fields for which to get facet information, and
--   options that control how the facet information is returned. Each
--   specified field must be facet-enabled in the domain configuration. The
--   fields and options are specified in JSON using the form
--   <tt>{<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION:</a>STRING"},<a>FIELD</a>:{<a>OPTION</a>:VALUE,<a>OPTION</a>:<a>STRING</a>}}</tt>
--   . You can specify the following faceting options: * <tt>buckets</tt>
--   specifies an array of the facet values or ranges to count. Ranges are
--   specified using the same syntax that you use to search for a range of
--   values. For more information, see <a>Searching for a Range of
--   Values</a> in the <i>Amazon CloudSearch Developer Guide</i> . Buckets
--   are returned in the order they are specified in the request. The
--   <tt>sort</tt> and <tt>size</tt> options are not valid if you specify
--   <tt>buckets</tt> . * <tt>size</tt> specifies the maximum number of
--   facets to include in the results. By default, Amazon CloudSearch
--   returns counts for the top 10. The <tt>size</tt> parameter is only
--   valid when you specify the <tt>sort</tt> option; it cannot be used in
--   conjunction with <tt>buckets</tt> . * <tt>sort</tt> specifies how you
--   want to sort the facets in the results: <tt>bucket</tt> or
--   <tt>count</tt> . Specify <tt>bucket</tt> to sort alphabetically or
--   numerically by facet value (in ascending order). Specify
--   <tt>count</tt> to sort by the facet counts computed for each facet
--   value (in descending order). To retrieve facet counts for particular
--   values or ranges of values, use the <tt>buckets</tt> option instead of
--   <tt>sort</tt> . If no facet options are specified, facet counts are
--   computed for all field 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 <tt>buckets</tt> option. For example, the
--   following request uses the <tt>buckets</tt> option to calculate and
--   return facet counts by decade.
--   <tt>{"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}}
--   </tt> To sort facets by facet count, use the <tt>count</tt> option.
--   For example, the following request sets the <tt>sort</tt> option to
--   <tt>count</tt> to sort the facet values by facet count, with the facet
--   values that have the most matching documents listed first. Setting the
--   <tt>size</tt> option to 3 returns only the top three facet values.
--   <tt>{"year":{"sort":"count","size":3}} </tt> To sort the facets by
--   value, use the <tt>bucket</tt> option. For example, the following
--   request sets the <tt>sort</tt> option to <tt>bucket</tt> to sort the
--   facet values numerically by year, with earliest year listed first.
--   <tt>{"year":{"sort":"bucket"}} </tt> For more information, see
--   <a>Getting and Using Facet Information</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .
seaFacet :: Lens' Search (Maybe Text)

-- | Enables partial results to be returned if one or more index partitions
--   are unavailable. When your search index is partitioned across multiple
--   search instances, by default Amazon CloudSearch only returns results
--   if every partition can be queried. This means that the failure of a
--   single search instance can result in 5xx (internal server) errors.
--   When you enable partial results, Amazon CloudSearch returns whatever
--   results are available and includes the percentage of documents
--   searched in the search results (percent-searched). This enables you to
--   more gracefully degrade your users' search experience. For example,
--   rather than displaying no results, you could display the partial
--   results and a message indicating that the results might be incomplete
--   due to a temporary system outage.
seaPartial :: Lens' Search (Maybe Bool)

-- | Specifies the search criteria for the request. How you specify the
--   search criteria depends on the query parser used for the request and
--   the parser options specified in the <tt>queryOptions</tt> parameter.
--   By default, the <tt>simple</tt> query parser is used to process
--   requests. To use the <tt>structured</tt> , <tt>lucene</tt> , or
--   <tt>dismax</tt> query parser, you must also specify the
--   <tt>queryParser</tt> parameter. For more information about specifying
--   search criteria, see <a>Searching Your Data</a> in the <i>Amazon
--   CloudSearch Developer Guide</i> .
seaQuery :: Lens' Search Text

-- | Creates a value of <a>SearchResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>searsStatus</a> - The status information returned for the
--   search request.</li>
--   <li><a>searsFacets</a> - The requested facet information.</li>
--   <li><a>searsStats</a> - The requested field statistics
--   information.</li>
--   <li><a>searsHits</a> - The documents that match the search
--   criteria.</li>
--   <li><a>searsResponseStatus</a> - -- | The response status code.</li>
--   </ul>
searchResponse :: Int -> SearchResponse

-- | The result of a <tt>Search</tt> request. Contains the documents that
--   match the specified search criteria and any requested fields,
--   highlights, and facet information.
--   
--   <i>See:</i> <a>searchResponse</a> smart constructor.
data SearchResponse

-- | The status information returned for the search request.
searsStatus :: Lens' SearchResponse (Maybe SearchStatus)

-- | The requested facet information.
searsFacets :: Lens' SearchResponse (HashMap Text BucketInfo)

-- | The requested field statistics information.
searsStats :: Lens' SearchResponse (HashMap Text FieldStats)

-- | The documents that match the search criteria.
searsHits :: Lens' SearchResponse (Maybe Hits)

-- | <ul>
--   <li>- | The response status code.</li>
--   </ul>
searsResponseStatus :: Lens' SearchResponse Int
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.Search.SearchResponse
instance Data.Data.Data Network.AWS.CloudSearchDomains.Search.SearchResponse
instance GHC.Show.Show Network.AWS.CloudSearchDomains.Search.SearchResponse
instance GHC.Read.Read Network.AWS.CloudSearchDomains.Search.SearchResponse
instance GHC.Classes.Eq Network.AWS.CloudSearchDomains.Search.SearchResponse
instance GHC.Generics.Generic Network.AWS.CloudSearchDomains.Search.Search
instance Data.Data.Data Network.AWS.CloudSearchDomains.Search.Search
instance GHC.Show.Show Network.AWS.CloudSearchDomains.Search.Search
instance GHC.Read.Read Network.AWS.CloudSearchDomains.Search.Search
instance GHC.Classes.Eq Network.AWS.CloudSearchDomains.Search.Search
instance Network.AWS.Types.AWSRequest Network.AWS.CloudSearchDomains.Search.Search
instance Data.Hashable.Class.Hashable Network.AWS.CloudSearchDomains.Search.Search
instance Control.DeepSeq.NFData Network.AWS.CloudSearchDomains.Search.Search
instance Network.AWS.Data.Headers.ToHeaders Network.AWS.CloudSearchDomains.Search.Search
instance Network.AWS.Data.Path.ToPath Network.AWS.CloudSearchDomains.Search.Search
instance Network.AWS.Data.Query.ToQuery Network.AWS.CloudSearchDomains.Search.Search
instance Control.DeepSeq.NFData Network.AWS.CloudSearchDomains.Search.SearchResponse


-- | You use the AmazonCloudSearch2013 API to upload documents to a search
--   domain and search those documents.
--   
--   The endpoints for submitting <tt>UploadDocuments</tt> ,
--   <tt>Search</tt> , and <tt>Suggest</tt> requests are domain-specific.
--   To get the endpoints for your domain, use the Amazon CloudSearch
--   configuration service <tt>DescribeDomains</tt> action. The domain
--   endpoints are also displayed on the domain dashboard in the Amazon
--   CloudSearch console. You submit suggest requests to the search
--   endpoint.
--   
--   For more information, see the <a>Amazon CloudSearch Developer
--   Guide</a> .
module Network.AWS.CloudSearchDomains

-- | API version <tt>2013-01-01</tt> of the Amazon CloudSearch Domain SDK
--   configuration.
cloudSearchDomains :: Service

-- | Information about any problems encountered while processing an upload
--   request.
_DocumentServiceException :: AsError a => Getting (First ServiceError) a ServiceError

-- | Information about any problems encountered while processing a search
--   request.
_SearchException :: AsError a => Getting (First ServiceError) a ServiceError
data ContentType
ApplicationJSON :: ContentType
ApplicationXML :: ContentType
data QueryParser
Dismax :: QueryParser
Lucene :: QueryParser
Simple :: QueryParser
Structured :: QueryParser

-- | A container for facet information.
--   
--   <i>See:</i> <a>bucket</a> smart constructor.
data Bucket

-- | Creates a value of <a>Bucket</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>bValue</a> - The facet value being counted.</li>
--   <li><a>bCount</a> - The number of hits that contain the facet value in
--   the specified facet field.</li>
--   </ul>
bucket :: Bucket

-- | The facet value being counted.
bValue :: Lens' Bucket (Maybe Text)

-- | The number of hits that contain the facet value in the specified facet
--   field.
bCount :: Lens' Bucket (Maybe Integer)

-- | A container for the calculated facet values and counts.
--   
--   <i>See:</i> <a>bucketInfo</a> smart constructor.
data BucketInfo

-- | Creates a value of <a>BucketInfo</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>biBuckets</a> - A list of the calculated facet values and
--   counts.</li>
--   </ul>
bucketInfo :: BucketInfo

-- | A list of the calculated facet values and counts.
biBuckets :: Lens' BucketInfo [Bucket]

-- | A warning returned by the document service when an issue is discovered
--   while processing an upload request.
--   
--   <i>See:</i> <a>documentServiceWarning</a> smart constructor.
data DocumentServiceWarning

-- | Creates a value of <a>DocumentServiceWarning</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>dswMessage</a> - The description for a warning returned by the
--   document service.</li>
--   </ul>
documentServiceWarning :: DocumentServiceWarning

-- | The description for a warning returned by the document service.
dswMessage :: Lens' DocumentServiceWarning (Maybe Text)

-- | The statistics for a field calculated in the request.
--   
--   <i>See:</i> <a>fieldStats</a> smart constructor.
data FieldStats

-- | Creates a value of <a>FieldStats</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>fsMax</a> - The maximum value found in the specified field in
--   the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>max</tt> is the string representation of a double-precision 64-bit
--   floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>max</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsMean</a> - The average of the values found in the specified
--   field in the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>mean</tt> is the string representation of a double-precision
--   64-bit floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>mean</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsCount</a> - The number of documents that contain a value in
--   the specified field in the result set.</li>
--   <li><a>fsMissing</a> - The number of documents that do not contain a
--   value in the specified field in the result set.</li>
--   <li><a>fsStddev</a> - The standard deviation of the values in the
--   specified field in the result set.</li>
--   <li><a>fsMin</a> - The minimum value found in the specified field in
--   the result set. If the field is numeric (<tt>int</tt> ,
--   <tt>int-array</tt> , <tt>double</tt> , or <tt>double-array</tt> ),
--   <tt>min</tt> is the string representation of a double-precision 64-bit
--   floating point value. If the field is <tt>date</tt> or
--   <tt>date-array</tt> , <tt>min</tt> is the string representation of a
--   date with the format specified in <a>IETF RFC3339</a> :
--   yyyy-mm-ddTHH:mm:ss.SSSZ.</li>
--   <li><a>fsSumOfSquares</a> - The sum of all field values in the result
--   set squared.</li>
--   <li><a>fsSum</a> - The sum of the field values across the documents in
--   the result set. <tt>null</tt> for date fields.</li>
--   </ul>
fieldStats :: FieldStats

-- | The maximum value found in the specified field in the result set. If
--   the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>max</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>max</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMax :: Lens' FieldStats (Maybe Text)

-- | The average of the values found in the specified field in the result
--   set. If the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>mean</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>mean</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMean :: Lens' FieldStats (Maybe Text)

-- | The number of documents that contain a value in the specified field in
--   the result set.
fsCount :: Lens' FieldStats (Maybe Integer)

-- | The number of documents that do not contain a value in the specified
--   field in the result set.
fsMissing :: Lens' FieldStats (Maybe Integer)

-- | The standard deviation of the values in the specified field in the
--   result set.
fsStddev :: Lens' FieldStats (Maybe Double)

-- | The minimum value found in the specified field in the result set. If
--   the field is numeric (<tt>int</tt> , <tt>int-array</tt> ,
--   <tt>double</tt> , or <tt>double-array</tt> ), <tt>min</tt> is the
--   string representation of a double-precision 64-bit floating point
--   value. If the field is <tt>date</tt> or <tt>date-array</tt> ,
--   <tt>min</tt> is the string representation of a date with the format
--   specified in <a>IETF RFC3339</a> : yyyy-mm-ddTHH:mm:ss.SSSZ.
fsMin :: Lens' FieldStats (Maybe Text)

-- | The sum of all field values in the result set squared.
fsSumOfSquares :: Lens' FieldStats (Maybe Double)

-- | The sum of the field values across the documents in the result set.
--   <tt>null</tt> for date fields.
fsSum :: Lens' FieldStats (Maybe Double)

-- | Information about a document that matches the search request.
--   
--   <i>See:</i> <a>hit</a> smart constructor.
data Hit

-- | Creates a value of <a>Hit</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>hitExprs</a> - The expressions returned from a document that
--   matches the search request.</li>
--   <li><a>hitId</a> - The document ID of a document that matches the
--   search request.</li>
--   <li><a>hitHighlights</a> - The highlights returned from a document
--   that matches the search request.</li>
--   <li><a>hitFields</a> - The fields returned from a document that
--   matches the search request.</li>
--   </ul>
hit :: Hit

-- | The expressions returned from a document that matches the search
--   request.
hitExprs :: Lens' Hit (HashMap Text Text)

-- | The document ID of a document that matches the search request.
hitId :: Lens' Hit (Maybe Text)

-- | The highlights returned from a document that matches the search
--   request.
hitHighlights :: Lens' Hit (HashMap Text Text)

-- | The fields returned from a document that matches the search request.
hitFields :: Lens' Hit (HashMap Text [Text])

-- | The collection of documents that match the search request.
--   
--   <i>See:</i> <a>hits</a> smart constructor.
data Hits

-- | Creates a value of <a>Hits</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>hCursor</a> - A cursor that can be used to retrieve the next
--   set of matching documents when you want to page through a large result
--   set.</li>
--   <li><a>hHit</a> - A document that matches the search request.</li>
--   <li><a>hStart</a> - The index of the first matching document.</li>
--   <li><a>hFound</a> - The total number of documents that match the
--   search request.</li>
--   </ul>
hits :: Hits

-- | A cursor that can be used to retrieve the next set of matching
--   documents when you want to page through a large result set.
hCursor :: Lens' Hits (Maybe Text)

-- | A document that matches the search request.
hHit :: Lens' Hits [Hit]

-- | The index of the first matching document.
hStart :: Lens' Hits (Maybe Integer)

-- | The total number of documents that match the search request.
hFound :: Lens' Hits (Maybe Integer)

-- | Contains the resource id (<tt>rid</tt> ) and the time it took to
--   process the request (<tt>timems</tt> ).
--   
--   <i>See:</i> <a>searchStatus</a> smart constructor.
data SearchStatus

-- | Creates a value of <a>SearchStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sRid</a> - The encrypted resource ID for the request.</li>
--   <li><a>sTimems</a> - How long it took to process the request, in
--   milliseconds.</li>
--   </ul>
searchStatus :: SearchStatus

-- | The encrypted resource ID for the request.
sRid :: Lens' SearchStatus (Maybe Text)

-- | How long it took to process the request, in milliseconds.
sTimems :: Lens' SearchStatus (Maybe Integer)

-- | Container for the suggestion information returned in a
--   <tt>SuggestResponse</tt> .
--   
--   <i>See:</i> <a>suggestModel</a> smart constructor.
data SuggestModel

-- | Creates a value of <a>SuggestModel</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>smFound</a> - The number of documents that were found to match
--   the query string.</li>
--   <li><a>smSuggestions</a> - The documents that match the query
--   string.</li>
--   <li><a>smQuery</a> - The query string specified in the suggest
--   request.</li>
--   </ul>
suggestModel :: SuggestModel

-- | The number of documents that were found to match the query string.
smFound :: Lens' SuggestModel (Maybe Integer)

-- | The documents that match the query string.
smSuggestions :: Lens' SuggestModel [SuggestionMatch]

-- | The query string specified in the suggest request.
smQuery :: Lens' SuggestModel (Maybe Text)

-- | Contains the resource id (<tt>rid</tt> ) and the time it took to
--   process the request (<tt>timems</tt> ).
--   
--   <i>See:</i> <a>suggestStatus</a> smart constructor.
data SuggestStatus

-- | Creates a value of <a>SuggestStatus</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>ssRid</a> - The encrypted resource ID for the request.</li>
--   <li><a>ssTimems</a> - How long it took to process the request, in
--   milliseconds.</li>
--   </ul>
suggestStatus :: SuggestStatus

-- | The encrypted resource ID for the request.
ssRid :: Lens' SuggestStatus (Maybe Text)

-- | How long it took to process the request, in milliseconds.
ssTimems :: Lens' SuggestStatus (Maybe Integer)

-- | An autocomplete suggestion that matches the query string specified in
--   a <tt>SuggestRequest</tt> .
--   
--   <i>See:</i> <a>suggestionMatch</a> smart constructor.
data SuggestionMatch

-- | Creates a value of <a>SuggestionMatch</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>smSuggestion</a> - The string that matches the query string
--   specified in the <tt>SuggestRequest</tt> .</li>
--   <li><a>smScore</a> - The relevance score of a suggested match.</li>
--   <li><a>smId</a> - The document ID of the suggested document.</li>
--   </ul>
suggestionMatch :: SuggestionMatch

-- | The string that matches the query string specified in the
--   <tt>SuggestRequest</tt> .
smSuggestion :: Lens' SuggestionMatch (Maybe Text)

-- | The relevance score of a suggested match.
smScore :: Lens' SuggestionMatch (Maybe Integer)

-- | The document ID of the suggested document.
smId :: Lens' SuggestionMatch (Maybe Text)
