Skip to content

Commit 9379d2e

Browse files
authored
Search doc fix (Azure#39488)
* Fix doc issues * udpate * update * update * update * updates
1 parent d321d99 commit 9379d2e

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ def __init__(self, **kwargs: Any) -> None:
18651865

18661866

18671867
class SearchScoreThreshold(VectorThreshold):
1868-
"""The results of the vector query will filter based on the '@search.score' value. Note this is
1868+
"""The results of the vector query will filter based on the '\\@search.score' value. Note this is
18691869
the @search.score returned as part of the search response. The threshold direction will be
18701870
chosen for higher @search.score.
18711871
@@ -1874,7 +1874,7 @@ class SearchScoreThreshold(VectorThreshold):
18741874
:ivar kind: The kind of threshold used to filter vector queries. Required. Known values are:
18751875
"vectorSimilarity" and "searchScore".
18761876
:vartype kind: str or ~azure.search.documents.models.VectorThresholdKind
1877-
:ivar value: The threshold will filter based on the '@search.score' value. Note this is the
1877+
:ivar value: The threshold will filter based on the '\\@search.score' value. Note this is the
18781878
@search.score returned as part of the search response. The threshold direction will be chosen
18791879
for higher @search.score. Required.
18801880
:vartype value: float
@@ -1892,7 +1892,7 @@ class SearchScoreThreshold(VectorThreshold):
18921892

18931893
def __init__(self, *, value: float, **kwargs: Any) -> None:
18941894
"""
1895-
:keyword value: The threshold will filter based on the '@search.score' value. Note this is the
1895+
:keyword value: The threshold will filter based on the '\\@search.score' value. Note this is the
18961896
@search.score returned as part of the search response. The threshold direction will be chosen
18971897
for higher @search.score. Required.
18981898
:paramtype value: float

sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_index_client_enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,6 @@ class VectorThresholdKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
419419
threshold direction (larger or smaller) will be chosen automatically according to the metric
420420
used by the field."""
421421
SEARCH_SCORE = "searchScore"
422-
"""The results of the vector query will filter based on the '@search.score' value. Note this is
422+
"""The results of the vector query will filter based on the '\\@search.score' value. Note this is
423423
the @search.score returned as part of the search response. The threshold direction will be
424424
chosen for higher @search.score."""

sdk/search/azure-search-documents/azure/search/documents/_search_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def index_documents(self, batch: IndexDocumentsBatch, **kwargs: Any) -> List[Ind
690690
:return: List of IndexingResult
691691
:rtype: list[IndexingResult]
692692
693-
:raises ~azure.search.documents.RequestEntityTooLargeError
693+
:raises ~azure.search.documents.RequestEntityTooLargeError: The request is too large.
694694
"""
695695
return self._index_documents_actions(actions=batch.actions, **kwargs)
696696

sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def index_documents(self, batch: IndexDocumentsBatch, **kwargs) -> List[Indexing
271271
:return: Indexing result of each action in the batch.
272272
:rtype: list[IndexingResult]
273273
274-
:raises ~azure.search.documents.RequestEntityTooLargeError
274+
:raises ~azure.search.documents.RequestEntityTooLargeError: The request is too large.
275275
"""
276276
return self._index_documents_actions(actions=batch.actions, **kwargs)
277277

sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ async def index_documents(self, batch: IndexDocumentsBatch, **kwargs: Any) -> Li
687687
:return: List of IndexingResult
688688
:rtype: list[IndexingResult]
689689
690-
:raises ~azure.search.documents.RequestEntityTooLargeError
690+
:raises ~azure.search.documents.RequestEntityTooLargeError: The request is too large.
691691
"""
692692
return await self._index_documents_actions(actions=batch.actions, **kwargs)
693693

sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def create_skillset(self, skillset: SearchIndexerSkillset, **kwargs: Any) -> Sea
597597
_validate_skillset(skillset)
598598
skillset_gen = skillset._to_generated() if hasattr(skillset, "_to_generated") else skillset
599599

600-
result = self._client.skillsets.create(skillset_gen, **kwargs)
600+
result = self._client.skillsets.create(skillset_gen, **kwargs) # type: ignore
601601
return cast(SearchIndexerSkillset, SearchIndexerSkillset._from_generated(result))
602602

603603
@distributed_trace
@@ -635,7 +635,7 @@ def create_or_update_skillset(
635635

636636
result = self._client.skillsets.create_or_update(
637637
skillset_name=skillset.name,
638-
skillset=skillset_gen,
638+
skillset=skillset_gen, # type: ignore
639639
prefer="return=representation",
640640
error_map=error_map,
641641
skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache,

sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ async def create_skillset(self, skillset: SearchIndexerSkillset, **kwargs: Any)
584584
"""
585585
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
586586
skillset_gen = skillset._to_generated() if hasattr(skillset, "_to_generated") else skillset
587-
result = await self._client.skillsets.create(skillset_gen, **kwargs)
587+
result = await self._client.skillsets.create(skillset_gen, **kwargs) # type: ignore
588588
return cast(SearchIndexerSkillset, SearchIndexerSkillset._from_generated(result))
589589

590590
@distributed_trace_async
@@ -621,7 +621,7 @@ async def create_or_update_skillset(
621621

622622
result = await self._client.skillsets.create_or_update(
623623
skillset_name=skillset.name,
624-
skillset=skillset_gen,
624+
skillset=skillset_gen, # type: ignore
625625
prefer="return=representation",
626626
error_map=error_map,
627627
skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache,

sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
self.e_tag = e_tag
9999
self.encryption_key = encryption_key
100100

101-
def _to_generated(self):
101+
def _to_generated(self) -> _SearchIndexerSkillset:
102102
generated_skills = []
103103
for skill in self.skills:
104104
if hasattr(skill, "_to_generated"):
@@ -108,7 +108,7 @@ def _to_generated(self):
108108
assert len(generated_skills) == len(self.skills)
109109
encryption_key = getattr(self, "encryption_key", None)
110110
return _SearchIndexerSkillset(
111-
name=getattr(self, "name", None),
111+
name=getattr(self, "name", ""),
112112
description=getattr(self, "description", None),
113113
skills=generated_skills,
114114
cognitive_services_account=getattr(self, "cognitive_services_account", None),
@@ -1153,7 +1153,7 @@ def _from_generated(cls, search_indexer_data_source) -> Optional[Self]:
11531153
if not search_indexer_data_source:
11541154
return None
11551155
connection_string = (
1156-
search_indexer_data_source.credentials.connection_string if search_indexer_data_source.credentials else None
1156+
search_indexer_data_source.credentials.connection_string if search_indexer_data_source.credentials else ""
11571157
)
11581158
return cls(
11591159
name=search_indexer_data_source.name,

0 commit comments

Comments
 (0)