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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _flatten_args(args):


class IndexDocumentsBatch(object):
"""Represent a batch of upate operations for documents in an Azure
"""Represent a batch of update operations for documents in an Azure
Search index.

Index operations are performed in the order in which they are added
Expand Down Expand Up @@ -81,7 +81,7 @@ def add_merge_actions(
self, *documents, **kwargs
): # pylint: disable=unused-argument
# type (Union[List[dict], List[List[dict]]]) -> List[IndexAction]
"""Add documents to merge in to existing documets in the Azure search
"""Add documents to merge in to existing documents in the Azure search
index.

Merge updates an existing document with the specified fields. If the
Expand All @@ -101,14 +101,14 @@ def add_merge_or_upload_actions(
self, *documents, **kwargs
): # pylint: disable=unused-argument
# type (Union[List[dict], List[List[dict]]]) -> List[IndexAction]
"""Add documents to merge in to existing documets in the Azure search
"""Add documents to merge in to existing documents in the Azure search
index, or upload if they do not yet exist.

This action behaves like *merge* if a document with the given key
already exists in the index. If the document does not exist, it behaves
like *upload* with a new document.

:param documents: Documents to merge or uplaod into an Azure search
:param documents: Documents to merge or upload into an Azure search
index. May be a single list of documents, or documents as individual
parameters.
:type documents: dict or list[dict]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _flatten_args(args):


class IndexDocumentsBatch(object):
"""Represent a batch of upate operations for documents in an Azure
"""Represent a batch of update operations for documents in an Azure
Search index.

Index operations are performed in the order in which they are added
Expand Down Expand Up @@ -77,7 +77,7 @@ async def add_delete_actions(self, *documents):

async def add_merge_actions(self, *documents):
# type (Union[List[dict], List[List[dict]]]) -> List[IndexAction]
"""Add documents to merge in to existing documets in the Azure search
"""Add documents to merge in to existing documents in the Azure search
index.

Merge updates an existing document with the specified fields. If the
Expand All @@ -95,14 +95,14 @@ async def add_merge_actions(self, *documents):

async def add_merge_or_upload_actions(self, *documents):
# type (Union[List[dict], List[List[dict]]]) -> List[IndexAction]
"""Add documents to merge in to existing documets in the Azure search
"""Add documents to merge in to existing documents in the Azure search
index, or upload if they do not yet exist.

This action behaves like *merge* if a document with the given key
already exists in the index. If the document does not exist, it behaves
like *upload* with a new document.

:param documents: Documents to merge or uplaod into an Azure search
:param documents: Documents to merge or upload into an Azure search
index. May be a single list of documents, or documents as individual
parameters.
:type documents: dict or list[dict]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def create_or_update_indexer(self, indexer, **kwargs):
:keyword disable_cache_reprocessing_change_detection: Disables cache reprocessing change
detection.
:paramtype disable_cache_reprocessing_change_detection: bool
:return: The created IndexSearchIndexerer
:return: The created SearchIndexer
:rtype: ~azure.search.documents.indexes.models.SearchIndexer
"""
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def speller():
client = SearchClient(endpoint=endpoint,
index_name=index_name,
credential=credential)
results = await client.search(search_text="luxucy", query_language="en-us", query_speller="lexicon")
results = await client.search(search_text="luxury", query_language="en-us", query_speller="lexicon")

async for result in results:
print("{}\n{}\n)".format(result["HotelId"], result["HotelName"]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def speller():
client = SearchClient(endpoint=endpoint,
index_name=index_name,
credential=credential)
results = list(client.search(search_text="luxucy", query_language="en-us", query_speller="lexicon"))
results = list(client.search(search_text="luxury", query_language="en-us", query_speller="lexicon"))

for result in results:
print("{}\n{}\n)".format(result["HotelId"], result["HotelName"]))
Expand Down