blib/lib/Paws/Kendra/Query.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Kendra::Query;
3 use Moose;
4 has AttributeFilter => (is => 'ro', isa => 'Paws::Kendra::AttributeFilter');
5 has DocumentRelevanceOverrideConfigurations => (is => 'ro', isa => 'ArrayRef[Paws::Kendra::DocumentRelevanceConfiguration]');
6 has Facets => (is => 'ro', isa => 'ArrayRef[Paws::Kendra::Facet]');
7 has IndexId => (is => 'ro', isa => 'Str', required => 1);
8 has PageNumber => (is => 'ro', isa => 'Int');
9 has PageSize => (is => 'ro', isa => 'Int');
10 has QueryResultTypeFilter => (is => 'ro', isa => 'Str');
11 has QueryText => (is => 'ro', isa => 'Str', required => 1);
12 has RequestedDocumentAttributes => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
13 has SortingConfiguration => (is => 'ro', isa => 'Paws::Kendra::SortingConfiguration');
14 has UserContext => (is => 'ro', isa => 'Paws::Kendra::UserContext');
15 has VisitorId => (is => 'ro', isa => 'Str');
16  
17 use MooseX::ClassAttribute;
18  
19 class_has _api_call => (isa => 'Str', is => 'ro', default => 'Query');
20 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Kendra::QueryResult');
21 class_has _result_key => (isa => 'Str', is => 'ro');
22 1;
23  
24 ### main pod documentation begin ###
25  
26 =head1 NAME
27  
28 Paws::Kendra::Query - Arguments for method Query on L<Paws::Kendra>
29  
30 =head1 DESCRIPTION
31  
32 This class represents the parameters used for calling the method Query on the
33 L<AWSKendraFrontendService|Paws::Kendra> service. Use the attributes of this class
34 as arguments to method Query.
35  
36 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Query.
37  
38 =head1 SYNOPSIS
39  
40 my $kendra = Paws->service('Kendra');
41 my $QueryResult = $kendra->Query(
42 IndexId => 'MyIndexId',
43 QueryText => 'MyQueryText',
44 AttributeFilter => {
45 AndAllFilters => [ <AttributeFilter>, ... ], # OPTIONAL
46 ContainsAll => {
47 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
48 Value => {
49 DateValue => '1970-01-01T01:00:00', # OPTIONAL
50 LongValue => 1, # OPTIONAL
51 StringListValue => [
52 'MyString', ... # min: 1, max: 2048
53 ], # OPTIONAL
54 StringValue =>
55 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
56 },
57  
58 }, # OPTIONAL
59 ContainsAny => {
60 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
61 Value => {
62 DateValue => '1970-01-01T01:00:00', # OPTIONAL
63 LongValue => 1, # OPTIONAL
64 StringListValue => [
65 'MyString', ... # min: 1, max: 2048
66 ], # OPTIONAL
67 StringValue =>
68 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
69 },
70  
71 }, # OPTIONAL
72 EqualsTo => {
73 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
74 Value => {
75 DateValue => '1970-01-01T01:00:00', # OPTIONAL
76 LongValue => 1, # OPTIONAL
77 StringListValue => [
78 'MyString', ... # min: 1, max: 2048
79 ], # OPTIONAL
80 StringValue =>
81 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
82 },
83  
84 }, # OPTIONAL
85 GreaterThan => {
86 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
87 Value => {
88 DateValue => '1970-01-01T01:00:00', # OPTIONAL
89 LongValue => 1, # OPTIONAL
90 StringListValue => [
91 'MyString', ... # min: 1, max: 2048
92 ], # OPTIONAL
93 StringValue =>
94 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
95 },
96  
97 }, # OPTIONAL
98 GreaterThanOrEquals => {
99 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
100 Value => {
101 DateValue => '1970-01-01T01:00:00', # OPTIONAL
102 LongValue => 1, # OPTIONAL
103 StringListValue => [
104 'MyString', ... # min: 1, max: 2048
105 ], # OPTIONAL
106 StringValue =>
107 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
108 },
109  
110 }, # OPTIONAL
111 LessThan => {
112 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
113 Value => {
114 DateValue => '1970-01-01T01:00:00', # OPTIONAL
115 LongValue => 1, # OPTIONAL
116 StringListValue => [
117 'MyString', ... # min: 1, max: 2048
118 ], # OPTIONAL
119 StringValue =>
120 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
121 },
122  
123 }, # OPTIONAL
124 LessThanOrEquals => {
125 Key => 'MyDocumentAttributeKey', # min: 1, max: 200
126 Value => {
127 DateValue => '1970-01-01T01:00:00', # OPTIONAL
128 LongValue => 1, # OPTIONAL
129 StringListValue => [
130 'MyString', ... # min: 1, max: 2048
131 ], # OPTIONAL
132 StringValue =>
133 'MyDocumentAttributeStringValue', # min: 1, max: 2048; OPTIONAL
134 },
135  
136 }, # OPTIONAL
137 NotFilter => <AttributeFilter>,
138 OrAllFilters => [ <AttributeFilter>, ... ], # OPTIONAL
139 }, # OPTIONAL
140 DocumentRelevanceOverrideConfigurations => [
141 {
142 Name => 'MyDocumentMetadataConfigurationName', # min: 1, max: 30
143 Relevance => {
144 Duration => 'MyDuration', # min: 1, max: 10; OPTIONAL
145 Freshness => 1, # OPTIONAL
146 Importance => 1, # min: 1, max: 10; OPTIONAL
147 RankOrder => 'ASCENDING', # values: ASCENDING, DESCENDING; OPTIONAL
148 ValueImportanceMap => {
149 'MyValueImportanceMapKey' =>
150 1, # key: min: 1, max: 50, value: min: 1, max: 10; OPTIONAL
151 }, # OPTIONAL
152 },
153  
154 },
155 ...
156 ], # OPTIONAL
157 Facets => [
158 {
159 DocumentAttributeKey => 'MyDocumentAttributeKey', # min: 1, max: 200
160 },
161 ...
162 ], # OPTIONAL
163 PageNumber => 1, # OPTIONAL
164 PageSize => 1, # OPTIONAL
165 QueryResultTypeFilter => 'DOCUMENT', # OPTIONAL
166 RequestedDocumentAttributes => [
167 'MyDocumentAttributeKey', ... # min: 1, max: 200
168 ], # OPTIONAL
169 SortingConfiguration => {
170 DocumentAttributeKey => 'MyDocumentAttributeKey', # min: 1, max: 200
171 SortOrder => 'DESC', # values: DESC, ASC
172  
173 }, # OPTIONAL
174 UserContext => {
175 Token => 'MyToken', # min: 1, max: 100000; OPTIONAL
176 }, # OPTIONAL
177 VisitorId => 'MyVisitorId', # OPTIONAL
178 );
179  
180 # Results:
181 my $FacetResults = $QueryResult->FacetResults;
182 my $QueryId = $QueryResult->QueryId;
183 my $ResultItems = $QueryResult->ResultItems;
184 my $TotalNumberOfResults = $QueryResult->TotalNumberOfResults;
185  
186 # Returns a L<Paws::Kendra::QueryResult> object.
187  
188 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
189 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kendra/Query>
190  
191 =head1 ATTRIBUTES
192  
193  
194 =head2 AttributeFilter => L<Paws::Kendra::AttributeFilter>
195  
196 Enables filtered searches based on document attributes. You can only
197 provide one attribute filter; however, the C<AndAllFilters>,
198 C<NotFilter>, and C<OrAllFilters> parameters contain a list of other
199 filters.
200  
201 The C<AttributeFilter> parameter enables you to create a set of
202 filtering rules that a document must satisfy to be included in the
203 query results.
204  
205  
206  
207 =head2 DocumentRelevanceOverrideConfigurations => ArrayRef[L<Paws::Kendra::DocumentRelevanceConfiguration>]
208  
209 Overrides relevance tuning configurations of fields or attributes set
210 at the index level.
211  
212 If you use this API to override the relevance tuning configured at the
213 index level, but there is no relevance tuning configured at the index
214 level, then Amazon Kendra does not apply any relevance tuning.
215  
216 If there is relevance tuning configured at the index level, but you do
217 not use this API to override any relevance tuning in the index, then
218 Amazon Kendra uses the relevance tuning that is configured at the index
219 level.
220  
221 If there is relevance tuning configured for fields at the index level,
222 but you use this API to override only some of these fields, then for
223 the fields you did not override, the importance is set to 1.
224  
225  
226  
227 =head2 Facets => ArrayRef[L<Paws::Kendra::Facet>]
228  
229 An array of documents attributes. Amazon Kendra returns a count for
230 each attribute key specified. You can use this information to help
231 narrow the search for your user.
232  
233  
234  
235 =head2 B<REQUIRED> IndexId => Str
236  
237 The unique identifier of the index to search. The identifier is
238 returned in the response from the C<CreateIndex> operation.
239  
240  
241  
242 =head2 PageNumber => Int
243  
244 Query results are returned in pages the size of the C<PageSize>
245 parameter. By default, Amazon Kendra returns the first page of results.
246 Use this parameter to get result pages after the first one.
247  
248  
249  
250 =head2 PageSize => Int
251  
252 Sets the number of results that are returned in each page of results.
253 The default page size is 10. The maximum number of results returned is
254 100. If you ask for more than 100 results, only 100 are returned.
255  
256  
257  
258 =head2 QueryResultTypeFilter => Str
259  
260 Sets the type of query. Only results for the specified query type are
261 returned.
262  
263 Valid values are: C<"DOCUMENT">, C<"QUESTION_ANSWER">, C<"ANSWER">
264  
265 =head2 B<REQUIRED> QueryText => Str
266  
267 The text to search for.
268  
269  
270  
271 =head2 RequestedDocumentAttributes => ArrayRef[Str|Undef]
272  
273 An array of document attributes to include in the response. No other
274 document attributes are included in the response. By default all
275 document attributes are included in the response.
276  
277  
278  
279 =head2 SortingConfiguration => L<Paws::Kendra::SortingConfiguration>
280  
281 Provides information that determines how the results of the query are
282 sorted. You can set the field that Amazon Kendra should sort the
283 results on, and specify whether the results should be sorted in
284 ascending or descending order. In the case of ties in sorting the
285 results, the results are sorted by relevance.
286  
287 If you don't provide sorting configuration, the results are sorted by
288 the relevance that Amazon Kendra determines for the result.
289  
290  
291  
292 =head2 UserContext => L<Paws::Kendra::UserContext>
293  
294 The user context token.
295  
296  
297  
298 =head2 VisitorId => Str
299  
300 Provides an identifier for a specific user. The C<VisitorId> should be
301 a unique identifier, such as a GUID. Don't use personally identifiable
302 information, such as the user's email address, as the C<VisitorId>.
303  
304  
305  
306  
307 =head1 SEE ALSO
308  
309 This class forms part of L<Paws>, documenting arguments for method Query in L<Paws::Kendra>
310  
311 =head1 BUGS and CONTRIBUTIONS
312  
313 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
314  
315 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
316  
317 =cut
318