Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/search/azure-search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 11.2.1 (Unreleased)
## 11.3.0b1 (Unreleased)


## 11.2.0 (2021-06-08)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
class ApiVersion(str, Enum):
#: this is the default version
V2020_06_30 = "2020-06-30"
V2020_06_30_preview = "2020-06-30-Preview"

DEFAULT_VERSION = ApiVersion.V2020_06_30
DEFAULT_VERSION = ApiVersion.V2020_06_30_preview
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(

self.endpoint = endpoint
self.index_name = index_name
self.api_version = "2020-06-30"
self.api_version = "2020-06-30-Preview"
kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION))
self._configure(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(

self.endpoint = endpoint
self.index_name = index_name
self.api_version = "2020-06-30"
self.api_version = "2020-06-30-Preview"
kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION))
self._configure(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
async def count(
self,
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> int:
"""Queries the number of documents in the index.

Expand All @@ -62,7 +62,7 @@ async def count(
_x_ms_client_request_id = None
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -105,7 +105,7 @@ async def search_get(
search_text: Optional[str] = None,
search_options: Optional["_models.SearchOptions"] = None,
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.SearchDocumentsResult":
"""Searches for documents in the index.

Expand Down Expand Up @@ -139,6 +139,9 @@ async def search_get(
_scoring_parameters = None
_scoring_profile = None
_search_fields = None
_query_language = None
_speller = None
_answers = None
_search_mode = None
_scoring_statistics = None
_session_id = None
Expand All @@ -161,13 +164,16 @@ async def search_get(
_scoring_parameters = search_options.scoring_parameters
_scoring_profile = search_options.scoring_profile
_search_fields = search_options.search_fields
_query_language = search_options.query_language
_speller = search_options.speller
_answers = search_options.answers
_search_mode = search_options.search_mode
_scoring_statistics = search_options.scoring_statistics
_session_id = search_options.session_id
_select = search_options.select
_skip = search_options.skip
_top = search_options.top
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -206,6 +212,12 @@ async def search_get(
query_parameters['scoringProfile'] = self._serialize.query("scoring_profile", _scoring_profile, 'str')
if _search_fields is not None:
query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',')
if _query_language is not None:
query_parameters['queryLanguage'] = self._serialize.query("query_language", _query_language, 'str')
if _speller is not None:
query_parameters['speller'] = self._serialize.query("speller", _speller, 'str')
if _answers is not None:
query_parameters['answers'] = self._serialize.query("answers", _answers, 'str')
if _search_mode is not None:
query_parameters['searchMode'] = self._serialize.query("search_mode", _search_mode, 'str')
if _scoring_statistics is not None:
Expand Down Expand Up @@ -247,7 +259,7 @@ async def search_post(
self,
search_request: "_models.SearchRequest",
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.SearchDocumentsResult":
"""Searches for documents in the index.

Expand All @@ -269,7 +281,7 @@ async def search_post(
_x_ms_client_request_id = None
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -317,8 +329,8 @@ async def get(
key: str,
selected_fields: Optional[List[str]] = None,
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
) -> Any:
**kwargs
) -> object:
"""Retrieves a document from the index.

:param key: The key of the document to retrieve.
Expand All @@ -329,11 +341,11 @@ async def get(
:param request_options: Parameter group.
:type request_options: ~azure.search.documents.models.RequestOptions
:keyword callable cls: A custom type or function that will be passed the direct response
:return: any, or the result of cls(response)
:rtype: any
:return: object, or the result of cls(response)
:rtype: object
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[Any]
cls = kwargs.pop('cls', None) # type: ClsType[object]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand All @@ -342,7 +354,7 @@ async def get(
_x_ms_client_request_id = None
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -389,7 +401,7 @@ async def suggest_get(
suggester_name: str,
suggest_options: Optional["_models.SuggestOptions"] = None,
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.SuggestDocumentsResult":
"""Suggests documents in the index that match the given partial query text.

Expand Down Expand Up @@ -436,7 +448,7 @@ async def suggest_get(
_search_fields = suggest_options.search_fields
_select = suggest_options.select
_top = suggest_options.top
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -498,7 +510,7 @@ async def suggest_post(
self,
suggest_request: "_models.SuggestRequest",
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.SuggestDocumentsResult":
"""Suggests documents in the index that match the given partial query text.

Expand All @@ -520,7 +532,7 @@ async def suggest_post(
_x_ms_client_request_id = None
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -567,7 +579,7 @@ async def index(
self,
actions: List["_models.IndexAction"],
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.IndexDocumentsResult":
"""Sends a batch of document write actions to the index.

Expand All @@ -591,7 +603,7 @@ async def index(
_x_ms_client_request_id = request_options.x_ms_client_request_id

_batch = _models.IndexBatch(actions=actions)
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -644,7 +656,7 @@ async def autocomplete_get(
suggester_name: str,
request_options: Optional["_models.RequestOptions"] = None,
autocomplete_options: Optional["_models.AutocompleteOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.AutocompleteResult":
"""Autocompletes incomplete query terms based on input text and matching terms in the index.

Expand Down Expand Up @@ -688,7 +700,7 @@ async def autocomplete_get(
_top = autocomplete_options.top
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -748,7 +760,7 @@ async def autocomplete_post(
self,
autocomplete_request: "_models.AutocompleteRequest",
request_options: Optional["_models.RequestOptions"] = None,
**kwargs: Any
**kwargs
) -> "_models.AutocompleteResult":
"""Autocompletes incomplete query terms based on input text and matching terms in the index.

Expand All @@ -770,7 +782,7 @@ async def autocomplete_post(
_x_ms_client_request_id = None
if request_options is not None:
_x_ms_client_request_id = request_options.x_ms_client_request_id
api_version = "2020-06-30"
api_version = "2020-06-30-Preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
# --------------------------------------------------------------------------

try:
from ._models_py3 import AnswerResult
from ._models_py3 import AutocompleteItem
from ._models_py3 import AutocompleteOptions
from ._models_py3 import AutocompleteRequest
from ._models_py3 import AutocompleteResult
from ._models_py3 import CaptionResult
from ._models_py3 import FacetResult
from ._models_py3 import IndexAction
from ._models_py3 import IndexBatch
Expand All @@ -27,10 +29,12 @@
from ._models_py3 import SuggestRequest
from ._models_py3 import SuggestResult
except (SyntaxError, ImportError):
from ._models import AnswerResult # type: ignore
from ._models import AutocompleteItem # type: ignore
from ._models import AutocompleteOptions # type: ignore
from ._models import AutocompleteRequest # type: ignore
from ._models import AutocompleteResult # type: ignore
from ._models import CaptionResult # type: ignore
from ._models import FacetResult # type: ignore
from ._models import IndexAction # type: ignore
from ._models import IndexBatch # type: ignore
Expand All @@ -48,18 +52,23 @@
from ._models import SuggestResult # type: ignore

from ._search_client_enums import (
Answers,
AutocompleteMode,
IndexActionType,
QueryLanguage,
QueryType,
ScoringStatistics,
SearchMode,
Speller,
)

__all__ = [
'AnswerResult',
'AutocompleteItem',
'AutocompleteOptions',
'AutocompleteRequest',
'AutocompleteResult',
'CaptionResult',
'FacetResult',
'IndexAction',
'IndexBatch',
Expand All @@ -75,9 +84,12 @@
'SuggestOptions',
'SuggestRequest',
'SuggestResult',
'Answers',
'AutocompleteMode',
'IndexActionType',
'QueryLanguage',
'QueryType',
'ScoringStatistics',
'SearchMode',
'Speller',
]
Loading