Skip to content

Commit

Permalink
Search refactoring 2 (#11584)
Browse files Browse the repository at this point in the history
Models and operations in searchindex.json shoud go into namespaces like so:

Azure.Search.Documents (SearchClient, SearchClientOptions)
Azure.Search.Documents.Models

Models and operations in searchservice.json should go into namespaces like so

Azure.Search.Documents.Indexes (SearchIndexClient, SearchIndexerClient)
Azure.Search.Documents.Indexes.Models
  • Loading branch information
xiangyan99 authored May 21, 2020
1 parent 72b0ec0 commit 4c7b8de
Show file tree
Hide file tree
Showing 78 changed files with 377 additions and 249 deletions.
1 change: 1 addition & 0 deletions sdk/search/azure-search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Breaking Changes**

- Reorganized `SearchServiceClient` into `SearchIndexClient` & `SearchIndexerClient` #11507
- Split searchindex.json and searchservice.json models and operations into separate namespaces #11508

## 1.0.0b3 (2020-05-04)

Expand Down
201 changes: 1 addition & 200 deletions sdk/search/azure-search-documents/azure/search/documents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,217 +24,18 @@
#
# --------------------------------------------------------------------------

from ._index import (
AutocompleteQuery,
IndexAction,
from ._internal import (
IndexDocumentsBatch,
IndexingResult,
SearchClient,
SearchItemPaged,
SearchQuery,
SuggestQuery,
odata,
)
from ._service import (
ComplexField,
SearchableField,
SimpleField,
SearchIndexClient,
SearchIndexerClient,
edm,
)
from ._service._generated.models import (
AnalyzeRequest,
AnalyzeResult,
AnalyzedTokenInfo,
AsciiFoldingTokenFilter,
AzureActiveDirectoryApplicationCredentials,
CharFilter,
CjkBigramTokenFilter,
ClassicTokenizer,
CommonGramTokenFilter,
ConditionalSkill,
CorsOptions,
CustomAnalyzer,
DataSourceCredentials,
DictionaryDecompounderTokenFilter,
DistanceScoringFunction,
DistanceScoringParameters,
EdgeNGramTokenFilter,
EdgeNGramTokenizer,
ElisionTokenFilter,
EntityRecognitionSkill,
FreshnessScoringFunction,
FreshnessScoringParameters,
GetIndexStatisticsResult,
ImageAnalysisSkill,
IndexingSchedule,
IndexingParameters,
InputFieldMappingEntry,
KeepTokenFilter,
KeyPhraseExtractionSkill,
KeywordMarkerTokenFilter,
KeywordTokenizer,
LanguageDetectionSkill,
LengthTokenFilter,
LexicalAnalyzer,
LexicalTokenizer,
LimitTokenFilter,
LuceneStandardAnalyzer,
LuceneStandardTokenizer,
MagnitudeScoringFunction,
MagnitudeScoringParameters,
MappingCharFilter,
MergeSkill,
MicrosoftLanguageStemmingTokenizer,
MicrosoftLanguageTokenizer,
NGramTokenFilter,
NGramTokenizer,
OcrSkill,
OutputFieldMappingEntry,
PatternCaptureTokenFilter,
PatternReplaceCharFilter,
PatternReplaceTokenFilter,
PhoneticTokenFilter,
RegexFlags,
SearchField,
SearchIndex,
SearchIndexer,
SearchIndexerDataContainer,
SearchIndexerDataSource,
SearchIndexerSkillset,
SearchResourceEncryptionKey,
ScoringFunction,
ScoringProfile,
SentimentSkill,
ShaperSkill,
ShingleTokenFilter,
SnowballTokenFilter,
SplitSkill,
StemmerOverrideTokenFilter,
StemmerTokenFilter,
StopAnalyzer,
StopwordsTokenFilter,
Suggester,
SynonymMap,
SynonymTokenFilter,
TagScoringFunction,
TagScoringParameters,
TextTranslationSkill,
TextWeights,
TokenFilter,
TruncateTokenFilter,
UaxUrlEmailTokenizer,
UniqueTokenFilter,
WebApiSkill,
WordDelimiterTokenFilter,
)
from ._service._models import PatternAnalyzer, PatternTokenizer
from ._version import VERSION

__version__ = VERSION


__all__ = (
"AnalyzeRequest",
"AnalyzeResult",
"AnalyzedTokenInfo",
"AsciiFoldingTokenFilter",
"AutocompleteQuery",
"AzureActiveDirectoryApplicationCredentials",
"CharFilter",
"CjkBigramTokenFilter",
"ClassicTokenizer",
"CommonGramTokenFilter",
"ComplexField",
"ConditionalSkill",
"CorsOptions",
"CustomAnalyzer",
"DataSourceCredentials",
"DictionaryDecompounderTokenFilter",
"DistanceScoringFunction",
"DistanceScoringParameters",
"EdgeNGramTokenFilter",
"EdgeNGramTokenizer",
"ElisionTokenFilter",
"EntityRecognitionSkill",
"FreshnessScoringFunction",
"FreshnessScoringParameters",
"GetIndexStatisticsResult",
"ImageAnalysisSkill",
"IndexingSchedule",
"IndexingParameters",
"IndexAction",
"IndexDocumentsBatch",
"IndexingResult",
"InputFieldMappingEntry",
"KeepTokenFilter",
"KeyPhraseExtractionSkill",
"KeywordMarkerTokenFilter",
"KeywordTokenizer",
"LanguageDetectionSkill",
"LengthTokenFilter",
"LexicalAnalyzer",
"LexicalTokenizer",
"LimitTokenFilter",
"LuceneStandardAnalyzer",
"LuceneStandardTokenizer",
"MagnitudeScoringFunction",
"MagnitudeScoringParameters",
"MappingCharFilter",
"MergeSkill",
"MicrosoftLanguageStemmingTokenizer",
"MicrosoftLanguageTokenizer",
"NGramTokenFilter",
"NGramTokenizer",
"OcrSkill",
"OutputFieldMappingEntry",
"PatternAnalyzer",
"PatternCaptureTokenFilter",
"PatternReplaceCharFilter",
"PatternReplaceTokenFilter",
"PatternTokenizer",
"PhoneticTokenFilter",
"RegexFlags",
"ScoringFunction",
"ScoringProfile",
"SearchClient",
"SearchField",
"SearchIndex",
"SearchIndexer",
"SearchIndexerDataContainer",
"SearchIndexerDataSource",
"SearchIndexerSkillset",
"SearchIndexerClient",
"SearchIndexClient",
"SearchItemPaged",
"SearchQuery",
"SearchResourceEncryptionKey",
"SearchableField",
"SentimentSkill",
"ShaperSkill",
"ShingleTokenFilter",
"SimpleField",
"SnowballTokenFilter",
"SplitSkill",
"StemmerOverrideTokenFilter",
"StemmerTokenFilter",
"StopAnalyzer",
"StopwordsTokenFilter",
"SuggestQuery",
"Suggester",
"SynonymMap",
"SynonymTokenFilter",
"TagScoringFunction",
"TagScoringParameters",
"TextTranslationSkill",
"TextWeights",
"TokenFilter",
"TruncateTokenFilter",
"UaxUrlEmailTokenizer",
"UniqueTokenFilter",
"WebApiSkill",
"WordDelimiterTokenFilter",
"edm",
"odata",
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@
#
# --------------------------------------------------------------------------

from ._index.aio import AsyncSearchItemPaged, SearchClient
from ._service.aio import (
SearchIndexClient,
SearchIndexerClient,
)
from ._internal.aio import AsyncSearchItemPaged, SearchClient


__all__ = (
"AsyncSearchItemPaged",
"SearchClient",
"SearchIndexClient",
"SearchIndexerClient",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------

from ._internal import (
SearchIndexClient,
SearchIndexerClient,
)


__all__ = (
"SearchIndexerClient",
"SearchIndexClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
get_access_conditions,
normalize_endpoint,
)
from .._headers_mixin import HeadersMixin
from .._version import SDK_MONIKER
from .. import SearchClient
from ..._headers_mixin import HeadersMixin
from ..._version import SDK_MONIKER
from ... import SearchClient

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from ._generated import SearchServiceClient as _SearchServiceClient
from ._generated.models import SearchIndexerSkillset
from ._utils import get_access_conditions, normalize_endpoint
from .._headers_mixin import HeadersMixin
from .._version import SDK_MONIKER
from ..._headers_mixin import HeadersMixin
from ..._version import SDK_MONIKER

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
from azure.core.async_paging import AsyncItemPaged
from .._generated.aio import SearchServiceClient as _SearchServiceClient
from .._generated.models import SynonymMap
from ...aio import SearchClient
from ....aio import SearchClient
from .._utils import (
delistize_flags_for_index,
listize_flags_for_index,
listize_synonyms,
get_access_conditions,
normalize_endpoint,
)
from ..._headers_mixin import HeadersMixin
from ..._version import SDK_MONIKER
from ...._headers_mixin import HeadersMixin
from ...._version import SDK_MONIKER

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from .._generated.aio import SearchServiceClient as _SearchServiceClient
from .._generated.models import SearchIndexerSkillset
from .._utils import get_access_conditions, normalize_endpoint
from ..._headers_mixin import HeadersMixin
from ..._version import SDK_MONIKER
from ...._headers_mixin import HeadersMixin
from ...._version import SDK_MONIKER

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------

from ._internal.aio import (
SearchIndexClient,
SearchIndexerClient,
)

__all__ = (
"SearchIndexClient",
"SearchIndexerClient",
)
Loading

0 comments on commit 4c7b8de

Please sign in to comment.