@@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4242 async def count (
4343 self ,
4444 request_options : Optional ["_models.RequestOptions" ] = None ,
45- ** kwargs : Any
45+ ** kwargs
4646 ) -> int :
4747 """Queries the number of documents in the index.
4848
@@ -62,7 +62,7 @@ async def count(
6262 _x_ms_client_request_id = None
6363 if request_options is not None :
6464 _x_ms_client_request_id = request_options .x_ms_client_request_id
65- api_version = "2020-06-30"
65+ api_version = "2020-06-30-Preview "
6666 accept = "application/json"
6767
6868 # Construct URL
@@ -105,7 +105,7 @@ async def search_get(
105105 search_text : Optional [str ] = None ,
106106 search_options : Optional ["_models.SearchOptions" ] = None ,
107107 request_options : Optional ["_models.RequestOptions" ] = None ,
108- ** kwargs : Any
108+ ** kwargs
109109 ) -> "_models.SearchDocumentsResult" :
110110 """Searches for documents in the index.
111111
@@ -139,6 +139,9 @@ async def search_get(
139139 _scoring_parameters = None
140140 _scoring_profile = None
141141 _search_fields = None
142+ _query_language = None
143+ _speller = None
144+ _answers = None
142145 _search_mode = None
143146 _scoring_statistics = None
144147 _session_id = None
@@ -161,13 +164,16 @@ async def search_get(
161164 _scoring_parameters = search_options .scoring_parameters
162165 _scoring_profile = search_options .scoring_profile
163166 _search_fields = search_options .search_fields
167+ _query_language = search_options .query_language
168+ _speller = search_options .speller
169+ _answers = search_options .answers
164170 _search_mode = search_options .search_mode
165171 _scoring_statistics = search_options .scoring_statistics
166172 _session_id = search_options .session_id
167173 _select = search_options .select
168174 _skip = search_options .skip
169175 _top = search_options .top
170- api_version = "2020-06-30"
176+ api_version = "2020-06-30-Preview "
171177 accept = "application/json"
172178
173179 # Construct URL
@@ -206,6 +212,12 @@ async def search_get(
206212 query_parameters ['scoringProfile' ] = self ._serialize .query ("scoring_profile" , _scoring_profile , 'str' )
207213 if _search_fields is not None :
208214 query_parameters ['searchFields' ] = self ._serialize .query ("search_fields" , _search_fields , '[str]' , div = ',' )
215+ if _query_language is not None :
216+ query_parameters ['queryLanguage' ] = self ._serialize .query ("query_language" , _query_language , 'str' )
217+ if _speller is not None :
218+ query_parameters ['speller' ] = self ._serialize .query ("speller" , _speller , 'str' )
219+ if _answers is not None :
220+ query_parameters ['answers' ] = self ._serialize .query ("answers" , _answers , 'str' )
209221 if _search_mode is not None :
210222 query_parameters ['searchMode' ] = self ._serialize .query ("search_mode" , _search_mode , 'str' )
211223 if _scoring_statistics is not None :
@@ -247,7 +259,7 @@ async def search_post(
247259 self ,
248260 search_request : "_models.SearchRequest" ,
249261 request_options : Optional ["_models.RequestOptions" ] = None ,
250- ** kwargs : Any
262+ ** kwargs
251263 ) -> "_models.SearchDocumentsResult" :
252264 """Searches for documents in the index.
253265
@@ -269,7 +281,7 @@ async def search_post(
269281 _x_ms_client_request_id = None
270282 if request_options is not None :
271283 _x_ms_client_request_id = request_options .x_ms_client_request_id
272- api_version = "2020-06-30"
284+ api_version = "2020-06-30-Preview "
273285 content_type = kwargs .pop ("content_type" , "application/json" )
274286 accept = "application/json"
275287
@@ -317,8 +329,8 @@ async def get(
317329 key : str ,
318330 selected_fields : Optional [List [str ]] = None ,
319331 request_options : Optional ["_models.RequestOptions" ] = None ,
320- ** kwargs : Any
321- ) -> Any :
332+ ** kwargs
333+ ) -> object :
322334 """Retrieves a document from the index.
323335
324336 :param key: The key of the document to retrieve.
@@ -329,11 +341,11 @@ async def get(
329341 :param request_options: Parameter group.
330342 :type request_options: ~azure.search.documents.models.RequestOptions
331343 :keyword callable cls: A custom type or function that will be passed the direct response
332- :return: any , or the result of cls(response)
333- :rtype: any
344+ :return: object , or the result of cls(response)
345+ :rtype: object
334346 :raises: ~azure.core.exceptions.HttpResponseError
335347 """
336- cls = kwargs .pop ('cls' , None ) # type: ClsType[Any ]
348+ cls = kwargs .pop ('cls' , None ) # type: ClsType[object ]
337349 error_map = {
338350 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError
339351 }
@@ -342,7 +354,7 @@ async def get(
342354 _x_ms_client_request_id = None
343355 if request_options is not None :
344356 _x_ms_client_request_id = request_options .x_ms_client_request_id
345- api_version = "2020-06-30"
357+ api_version = "2020-06-30-Preview "
346358 accept = "application/json"
347359
348360 # Construct URL
@@ -389,7 +401,7 @@ async def suggest_get(
389401 suggester_name : str ,
390402 suggest_options : Optional ["_models.SuggestOptions" ] = None ,
391403 request_options : Optional ["_models.RequestOptions" ] = None ,
392- ** kwargs : Any
404+ ** kwargs
393405 ) -> "_models.SuggestDocumentsResult" :
394406 """Suggests documents in the index that match the given partial query text.
395407
@@ -436,7 +448,7 @@ async def suggest_get(
436448 _search_fields = suggest_options .search_fields
437449 _select = suggest_options .select
438450 _top = suggest_options .top
439- api_version = "2020-06-30"
451+ api_version = "2020-06-30-Preview "
440452 accept = "application/json"
441453
442454 # Construct URL
@@ -498,7 +510,7 @@ async def suggest_post(
498510 self ,
499511 suggest_request : "_models.SuggestRequest" ,
500512 request_options : Optional ["_models.RequestOptions" ] = None ,
501- ** kwargs : Any
513+ ** kwargs
502514 ) -> "_models.SuggestDocumentsResult" :
503515 """Suggests documents in the index that match the given partial query text.
504516
@@ -520,7 +532,7 @@ async def suggest_post(
520532 _x_ms_client_request_id = None
521533 if request_options is not None :
522534 _x_ms_client_request_id = request_options .x_ms_client_request_id
523- api_version = "2020-06-30"
535+ api_version = "2020-06-30-Preview "
524536 content_type = kwargs .pop ("content_type" , "application/json" )
525537 accept = "application/json"
526538
@@ -567,7 +579,7 @@ async def index(
567579 self ,
568580 actions : List ["_models.IndexAction" ],
569581 request_options : Optional ["_models.RequestOptions" ] = None ,
570- ** kwargs : Any
582+ ** kwargs
571583 ) -> "_models.IndexDocumentsResult" :
572584 """Sends a batch of document write actions to the index.
573585
@@ -591,7 +603,7 @@ async def index(
591603 _x_ms_client_request_id = request_options .x_ms_client_request_id
592604
593605 _batch = _models .IndexBatch (actions = actions )
594- api_version = "2020-06-30"
606+ api_version = "2020-06-30-Preview "
595607 content_type = kwargs .pop ("content_type" , "application/json" )
596608 accept = "application/json"
597609
@@ -644,7 +656,7 @@ async def autocomplete_get(
644656 suggester_name : str ,
645657 request_options : Optional ["_models.RequestOptions" ] = None ,
646658 autocomplete_options : Optional ["_models.AutocompleteOptions" ] = None ,
647- ** kwargs : Any
659+ ** kwargs
648660 ) -> "_models.AutocompleteResult" :
649661 """Autocompletes incomplete query terms based on input text and matching terms in the index.
650662
@@ -688,7 +700,7 @@ async def autocomplete_get(
688700 _top = autocomplete_options .top
689701 if request_options is not None :
690702 _x_ms_client_request_id = request_options .x_ms_client_request_id
691- api_version = "2020-06-30"
703+ api_version = "2020-06-30-Preview "
692704 accept = "application/json"
693705
694706 # Construct URL
@@ -748,7 +760,7 @@ async def autocomplete_post(
748760 self ,
749761 autocomplete_request : "_models.AutocompleteRequest" ,
750762 request_options : Optional ["_models.RequestOptions" ] = None ,
751- ** kwargs : Any
763+ ** kwargs
752764 ) -> "_models.AutocompleteResult" :
753765 """Autocompletes incomplete query terms based on input text and matching terms in the index.
754766
@@ -770,7 +782,7 @@ async def autocomplete_post(
770782 _x_ms_client_request_id = None
771783 if request_options is not None :
772784 _x_ms_client_request_id = request_options .x_ms_client_request_id
773- api_version = "2020-06-30"
785+ api_version = "2020-06-30-Preview "
774786 content_type = kwargs .pop ("content_type" , "application/json" )
775787 accept = "application/json"
776788
0 commit comments