azure.search.documents.indexes.models package

class azure.search.documents.indexes.models.AnalyzeResult(*, tokens: List[_models.AnalyzedTokenInfo], **kwargs: Any)[source]

The result of testing an analyzer on text.

All required parameters must be populated in order to send to server.

Variables:

tokens (list[AnalyzedTokenInfo]) – The list of tokens returned by the analyzer specified in the request. Required.

Keyword Arguments:

tokens (list[AnalyzedTokenInfo]) – The list of tokens returned by the analyzer specified in the request. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.AnalyzeTextOptions(*, text: str, analyzer_name: str | None = None, tokenizer_name: str | None = None, normalizer_name: str | None = None, token_filters: List[str] | None = None, char_filters: List[str] | None = None, **kwargs)[source]

Specifies some text and analysis components used to break that text into tokens.

All required parameters must be populated in order to send to Azure.

Variables:
  • text (str) – Required. The text to break into tokens.

  • analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer to use to break the given text. If this parameter is not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: “ar.microsoft”, “ar.lucene”, “hy.lucene”, “bn.microsoft”, “eu.lucene”, “bg.microsoft”, “bg.lucene”, “ca.microsoft”, “ca.lucene”, “zh- Hans.microsoft”, “zh-Hans.lucene”, “zh-Hant.microsoft”, “zh-Hant.lucene”, “hr.microsoft”, “cs.microsoft”, “cs.lucene”, “da.microsoft”, “da.lucene”, “nl.microsoft”, “nl.lucene”, “en.microsoft”, “en.lucene”, “et.microsoft”, “fi.microsoft”, “fi.lucene”, “fr.microsoft”, “fr.lucene”, “gl.lucene”, “de.microsoft”, “de.lucene”, “el.microsoft”, “el.lucene”, “gu.microsoft”, “he.microsoft”, “hi.microsoft”, “hi.lucene”, “hu.microsoft”, “hu.lucene”, “is.microsoft”, “id.microsoft”, “id.lucene”, “ga.lucene”, “it.microsoft”, “it.lucene”, “ja.microsoft”, “ja.lucene”, “kn.microsoft”, “ko.microsoft”, “ko.lucene”, “lv.microsoft”, “lv.lucene”, “lt.microsoft”, “ml.microsoft”, “ms.microsoft”, “mr.microsoft”, “nb.microsoft”, “no.lucene”, “fa.lucene”, “pl.microsoft”, “pl.lucene”, “pt-BR.microsoft”, “pt-BR.lucene”, “pt- PT.microsoft”, “pt-PT.lucene”, “pa.microsoft”, “ro.microsoft”, “ro.lucene”, “ru.microsoft”, “ru.lucene”, “sr-cyrillic.microsoft”, “sr-latin.microsoft”, “sk.microsoft”, “sl.microsoft”, “es.microsoft”, “es.lucene”, “sv.microsoft”, “sv.lucene”, “ta.microsoft”, “te.microsoft”, “th.microsoft”, “th.lucene”, “tr.microsoft”, “tr.lucene”, “uk.microsoft”, “ur.microsoft”, “vi.microsoft”, “standard.lucene”, “standardasciifolding.lucene”, “keyword”, “pattern”, “simple”, “stop”, “whitespace”.

  • tokenizer_name (str or LexicalTokenizerName) – The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: “classic”, “edgeNGram”, “keyword_v2”, “letter”, “lowercase”, “microsoft_language_tokenizer”, “microsoft_language_stemming_tokenizer”, “nGram”, “path_hierarchy_v2”, “pattern”, “standard_v2”, “uax_url_email”, “whitespace”.

  • token_filters (list[str or TokenFilterName]) – An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

  • char_filters (list[str]) – An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a AnalyzeTextOptions instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A AnalyzeTextOptions instance

Return type:

AnalyzeTextOptions

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A AnalyzeTextOptions instance

Return type:

AnalyzeTextOptions

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.AnalyzedTokenInfo(**kwargs: Any)[source]

Information about a token returned by an analyzer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • token (str) – The token returned by the analyzer. Required.

  • start_offset (int) – The index of the first character of the token in the input text. Required.

  • end_offset (int) – The index of the last character of the token in the input text. Required.

  • position (int) – The position of the token in the input text relative to other tokens. The first token in the input text has position 0, the next has position 1, and so on. Depending on the analyzer used, some tokens might have the same position, for example if they are synonyms of each other. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.AsciiFoldingTokenFilter(*, name: str, preserve_original: bool = False, **kwargs: Any)[source]

Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the “Basic Latin” Unicode block) into their ASCII equivalents, if such equivalents exist. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • preserve_original (bool) – A value indicating whether the original token will be kept. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • preserve_original (bool) – A value indicating whether the original token will be kept. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.AzureOpenAIEmbeddingSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], resource_url: str | None = None, deployment_name: str | None = None, api_key: str | None = None, auth_identity: _models.SearchIndexerDataIdentity | None = None, model_name: str | _models.AzureOpenAIModelName | None = None, name: str | None = None, description: str | None = None, context: str | None = None, dimensions: int | None = None, **kwargs: Any)[source]

Allows you to generate a vector embedding for a given text input using the Azure OpenAI resource.

All required parameters must be populated in order to send to server.

Variables:
  • resource_url (str) – The resource URI of the Azure OpenAI resource.

  • deployment_name (str) – ID of the Azure OpenAI model deployment on the designated resource.

  • api_key (str) – API key of the designated Azure OpenAI resource.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections.

  • model_name (str or AzureOpenAIModelName) – The name of the embedding model that is deployed at the provided deploymentId path. Known values are: “text-embedding-ada-002”, “text-embedding-3-large”, and “text-embedding-3-small”.

  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • dimensions (int) – The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

Keyword Arguments:
  • resource_url (str) – The resource URI of the Azure OpenAI resource.

  • deployment_name (str) – ID of the Azure OpenAI model deployment on the designated resource.

  • api_key (str) – API key of the designated Azure OpenAI resource.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections.

  • model_name (str or AzureOpenAIModelName) – The name of the embedding model that is deployed at the provided deploymentId path. Known values are: “text-embedding-ada-002”, “text-embedding-3-large”, and “text-embedding-3-small”.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • dimensions (int) – The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.AzureOpenAIModelName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The Azure Open AI model name that will be called.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

TEXT_EMBEDDING3_LARGE = 'text-embedding-3-large'
TEXT_EMBEDDING3_SMALL = 'text-embedding-3-small'
TEXT_EMBEDDING_ADA002 = 'text-embedding-ada-002'
class azure.search.documents.indexes.models.AzureOpenAIVectorizer(*, vectorizer_name: str, parameters: _models.AzureOpenAIVectorizerParameters | None = None, **kwargs: Any)[source]

Specifies the Azure OpenAI resource used to vectorize a query string.

All required parameters must be populated in order to send to server.

Variables:
  • vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

  • kind (str or VectorSearchVectorizerKind) – The name of the kind of vectorization method being configured for use with vector search. Required. Known values are: “azureOpenAI” and “customWebApi”.

  • parameters (AzureOpenAIVectorizerParameters) – Contains the parameters specific to Azure OpenAI embedding vectorization.

Keyword Arguments:
  • vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

  • parameters (AzureOpenAIVectorizerParameters) – Contains the parameters specific to Azure OpenAI embedding vectorization.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.AzureOpenAIVectorizerParameters(*, resource_url: str | None = None, deployment_name: str | None = None, api_key: str | None = None, auth_identity: _models.SearchIndexerDataIdentity | None = None, model_name: str | _models.AzureOpenAIModelName | None = None, **kwargs: Any)[source]

Specifies the parameters for connecting to the Azure OpenAI resource.

Variables:
  • resource_url (str) – The resource URI of the Azure OpenAI resource.

  • deployment_name (str) – ID of the Azure OpenAI model deployment on the designated resource.

  • api_key (str) – API key of the designated Azure OpenAI resource.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections.

  • model_name (str or AzureOpenAIModelName) – The name of the embedding model that is deployed at the provided deploymentId path. Known values are: “text-embedding-ada-002”, “text-embedding-3-large”, and “text-embedding-3-small”.

Keyword Arguments:
  • resource_url (str) – The resource URI of the Azure OpenAI resource.

  • deployment_name (str) – ID of the Azure OpenAI model deployment on the designated resource.

  • api_key (str) – API key of the designated Azure OpenAI resource.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections.

  • model_name (str or AzureOpenAIModelName) – The name of the embedding model that is deployed at the provided deploymentId path. Known values are: “text-embedding-ada-002”, “text-embedding-3-large”, and “text-embedding-3-small”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.BM25SimilarityAlgorithm(*, k1: float | None = None, b: float | None = None, **kwargs: Any)[source]

Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a TF-IDF-like algorithm that includes length normalization (controlled by the ‘b’ parameter) as well as term frequency saturation (controlled by the ‘k1’ parameter).

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – Required.

  • k1 (float) – This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.

  • b (float) – This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document.

Keyword Arguments:
  • k1 (float) – This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency.

  • b (float) – This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.BinaryQuantizationCompression(*, compression_name: str, rerank_with_original_vectors: bool = True, default_oversampling: float | None = None, **kwargs: Any)[source]

Contains configuration options specific to the binary quantization compression method used during indexing and querying.

All required parameters must be populated in order to send to server.

Variables:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchCompressionKind) – The name of the kind of compression method being configured for use with vector search. Required. Known values are: “scalarQuantization” and “binaryQuantization”.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

Keyword Arguments:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.BlobIndexerDataToExtract(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when “imageAction” is set to a value other than “none”. This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ALL_METADATA = 'allMetadata'

Extracts metadata provided by the Azure blob storage subsystem and the content-type specific metadata (for example, metadata unique to just .png files are indexed).

CONTENT_AND_METADATA = 'contentAndMetadata'

Extracts all metadata and textual content from each blob.

STORAGE_METADATA = 'storageMetadata'

Indexes just the standard blob properties and user-specified metadata.

class azure.search.documents.indexes.models.BlobIndexerImageAction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Determines how to process embedded images and image files in Azure blob storage. Setting the “imageAction” configuration to any value other than “none” requires that a skillset also be attached to that indexer.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

GENERATE_NORMALIZED_IMAGES = 'generateNormalizedImages'

Extracts text from images (for example, the word “STOP” from a traffic stop sign), and embeds it into the content field. This action requires that “dataToExtract” is set to “contentAndMetadata”. A normalized image refers to additional processing resulting in uniform image output, sized and rotated to promote consistent rendering when you include images in visual search results. This information is generated for each image when you use this option.

GENERATE_NORMALIZED_IMAGE_PER_PAGE = 'generateNormalizedImagePerPage'

Extracts text from images (for example, the word “STOP” from a traffic stop sign), and embeds it into the content field, but treats PDF files differently in that each page will be rendered as an image and normalized accordingly, instead of extracting embedded images. Non-PDF file types will be treated the same as if “generateNormalizedImages” was set.

NONE = 'none'

Ignores embedded images or image files in the data set. This is the default.

class azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Determines algorithm for text extraction from PDF files in Azure blob storage.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DETECT_ANGLES = 'detectAngles'

May produce better and more readable text extraction from PDF files that have rotated text within them. Note that there may be a small performance speed impact when this parameter is used. This parameter only applies to PDF files, and only to PDFs with embedded text. If the rotated text appears within an embedded image in the PDF, this parameter does not apply.

NONE = 'none'

Leverages normal text extraction. This is the default.

class azure.search.documents.indexes.models.BlobIndexerParsingMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Represents the parsing mode for indexing from an Azure blob data source.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DEFAULT = 'default'

Set to default for normal file processing.

DELIMITED_TEXT = 'delimitedText'

Set to delimitedText when blobs are plain CSV files.

JSON = 'json'

Set to json to extract structured content from JSON files.

JSON_ARRAY = 'jsonArray'

Set to jsonArray to extract individual elements of a JSON array as separate documents.

JSON_LINES = 'jsonLines'

Set to jsonLines to extract individual JSON entities, separated by a new line, as separate documents.

TEXT = 'text'

Set to text to improve indexing performance on plain text files in blob storage.

class azure.search.documents.indexes.models.CharFilter(*, name: str, **kwargs: Any)[source]

Base type for character filters.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MappingCharFilter, PatternReplaceCharFilter

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of char filter. Required.

  • name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

Keyword Arguments:

name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CharFilterName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the names of all character filters supported by the search engine.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

HTML_STRIP = 'html_strip'

A character filter that attempts to strip out HTML constructs. See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html

class azure.search.documents.indexes.models.CjkBigramTokenFilter(*, name: str, ignore_scripts: List[str | _models.CjkBigramTokenFilterScripts] | None = None, output_unigrams: bool = False, **kwargs: Any)[source]

Forms bigrams of CJK terms that are generated from the standard tokenizer. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • ignore_scripts (list[str or CjkBigramTokenFilterScripts]) – The scripts to ignore.

  • output_unigrams (bool) – A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • ignore_scripts (list[str or CjkBigramTokenFilterScripts]) – The scripts to ignore.

  • output_unigrams (bool) – A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CjkBigramTokenFilterScripts(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Scripts that can be ignored by CjkBigramTokenFilter.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

HAN = 'han'

Ignore Han script when forming bigrams of CJK terms.

HANGUL = 'hangul'

Ignore Hangul script when forming bigrams of CJK terms.

HIRAGANA = 'hiragana'

Ignore Hiragana script when forming bigrams of CJK terms.

KATAKANA = 'katakana'

Ignore Katakana script when forming bigrams of CJK terms.

class azure.search.documents.indexes.models.ClassicSimilarityAlgorithm(**kwargs: Any)[source]

Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF. This variation of TF-IDF introduces static document length normalization as well as coordinating factors that penalize documents that only partially match the searched queries.

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ClassicTokenizer(*, name: str, max_token_length: int = 255, **kwargs: Any)[source]

Grammar-based tokenizer that is suitable for processing most European-language documents. This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CognitiveServicesAccount(*, description: str | None = None, **kwargs: Any)[source]

Base type for describing any Azure AI service resource attached to a skillset.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CognitiveServicesAccountKey, DefaultCognitiveServicesAccount

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of Azure AI service resource attached to a skillset. Required.

  • description (str) – Description of the Azure AI service resource attached to a skillset.

Keyword Arguments:

description (str) – Description of the Azure AI service resource attached to a skillset.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CognitiveServicesAccountKey(*, key: str, description: str | None = None, **kwargs: Any)[source]

The multi-region account key of an Azure AI service resource that’s attached to a skillset.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of Azure AI service resource attached to a skillset. Required.

  • description (str) – Description of the Azure AI service resource attached to a skillset.

  • key (str) – The key used to provision the Azure AI service resource attached to a skillset. Required.

Keyword Arguments:
  • description (str) – Description of the Azure AI service resource attached to a skillset.

  • key (str) – The key used to provision the Azure AI service resource attached to a skillset. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CommonGramTokenFilter(*, name: str, common_words: List[str], ignore_case: bool = False, use_query_mode: bool = False, **kwargs: Any)[source]

Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • common_words (list[str]) – The set of common words. Required.

  • ignore_case (bool) – A value indicating whether common words matching will be case insensitive. Default is false.

  • use_query_mode (bool) – A value that indicates whether the token filter is in query mode. When in query mode, the token filter generates bigrams and then removes common words and single terms followed by a common word. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • common_words (list[str]) – The set of common words. Required.

  • ignore_case (bool) – A value indicating whether common words matching will be case insensitive. Default is false.

  • use_query_mode (bool) – A value that indicates whether the token filter is in query mode. When in query mode, the token filter generates bigrams and then removes common words and single terms followed by a common word. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ConditionalSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, **kwargs: Any)[source]

A skill that enables scenarios that require a Boolean operation to determine the data to assign to an output.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CorsOptions(*, allowed_origins: List[str], max_age_in_seconds: int | None = None, **kwargs: Any)[source]

Defines options to control Cross-Origin Resource Sharing (CORS) for an index.

All required parameters must be populated in order to send to server.

Variables:
  • allowed_origins (list[str]) – The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single ‘*’ to allow all origins (not recommended). Required.

  • max_age_in_seconds (int) – The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

Keyword Arguments:
  • allowed_origins (list[str]) – The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single ‘*’ to allow all origins (not recommended). Required.

  • max_age_in_seconds (int) – The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CustomAnalyzer(**kwargs)[source]

Allows you to take control over the process of converting text into indexable/searchable tokens. It’s a user-defined configuration consisting of a single predefined tokenizer and one or more filters. The tokenizer is responsible for breaking text into tokens, and the filters for modifying tokens emitted by the tokenizer.

All required parameters must be populated in order to send to Azure.

Variables:
  • odata_type (str) – Required. Identifies the concrete type of the analyzer.Constant filled by server.

  • name (str) – Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

  • tokenizer_name (str or LexicalTokenizerName) – Required. The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as breaking a sentence into words. Possible values include: “classic”, “edgeNGram”, “keyword_v2”, “letter”, “lowercase”, “microsoft_language_tokenizer”, “microsoft_language_stemming_tokenizer”, “nGram”, “path_hierarchy_v2”, “pattern”, “standard_v2”, “uax_url_email”, “whitespace”.

  • token_filters (list[str or TokenFilterName]) – A list of token filters used to filter out or modify the tokens generated by a tokenizer. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed.

  • char_filters (list[str]) – A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed.

Keyword Arguments:

name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CustomEntity(*, name: str, description: str | None = None, type: str | None = None, subtype: str | None = None, id: str | None = None, case_sensitive: bool | None = None, accent_sensitive: bool | None = None, fuzzy_edit_distance: int | None = None, default_case_sensitive: bool | None = None, default_accent_sensitive: bool | None = None, default_fuzzy_edit_distance: int | None = None, aliases: List[_models.CustomEntityAlias] | None = None, **kwargs: Any)[source]

An object that contains information about the matches that were found, and related metadata.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the “normalized” form of the text being found. Required.

  • description (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • type (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • subtype (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • id (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • case_sensitive (bool) – Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of “Microsoft” could be: microsoft, microSoft, MICROSOFT.

  • accent_sensitive (bool) – Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent.

  • fuzzy_edit_distance (int) – Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, “Windows10” would still match “Windows”, “Windows10” and “Windows 7”. When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do.

  • default_case_sensitive (bool) – Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values.

  • default_accent_sensitive (bool) – Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values.

  • default_fuzzy_edit_distance (int) – Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values.

  • aliases (list[CustomEntityAlias]) – An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

Keyword Arguments:
  • name (str) – The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the “normalized” form of the text being found. Required.

  • description (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • type (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • subtype (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • id (str) – This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

  • case_sensitive (bool) – Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of “Microsoft” could be: microsoft, microSoft, MICROSOFT.

  • accent_sensitive (bool) – Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent.

  • fuzzy_edit_distance (int) – Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, “Windows10” would still match “Windows”, “Windows10” and “Windows 7”. When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do.

  • default_case_sensitive (bool) – Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values.

  • default_accent_sensitive (bool) – Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values.

  • default_fuzzy_edit_distance (int) – Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values.

  • aliases (list[CustomEntityAlias]) – An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CustomEntityAlias(*, text: str, case_sensitive: bool | None = None, accent_sensitive: bool | None = None, fuzzy_edit_distance: int | None = None, **kwargs: Any)[source]

A complex object that can be used to specify alternative spellings or synonyms to the root entity name.

All required parameters must be populated in order to send to server.

Variables:
  • text (str) – The text of the alias. Required.

  • case_sensitive (bool) – Determine if the alias is case sensitive.

  • accent_sensitive (bool) – Determine if the alias is accent sensitive.

  • fuzzy_edit_distance (int) – Determine the fuzzy edit distance of the alias.

Keyword Arguments:
  • text (str) – The text of the alias. Required.

  • case_sensitive (bool) – Determine if the alias is case sensitive.

  • accent_sensitive (bool) – Determine if the alias is accent sensitive.

  • fuzzy_edit_distance (int) – Determine the fuzzy edit distance of the alias.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CustomEntityLookupSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | _models.CustomEntityLookupSkillLanguage | None = None, entities_definition_uri: str | None = None, inline_entities_definition: List[_models.CustomEntity] | None = None, global_default_case_sensitive: bool | None = None, global_default_accent_sensitive: bool | None = None, global_default_fuzzy_edit_distance: int | None = None, **kwargs: Any)[source]

A skill looks for text from a custom, user-defined list of words and phrases.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or CustomEntityLookupSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, and “pt”.

  • entities_definition_uri (str) – Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS.

  • inline_entities_definition (list[CustomEntity]) – The inline CustomEntity definition.

  • global_default_case_sensitive (bool) – A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value.

  • global_default_accent_sensitive (bool) – A global flag for AccentSensitive. If AccentSensitive is not set in CustomEntity, this value will be the default value.

  • global_default_fuzzy_edit_distance (int) – A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or CustomEntityLookupSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, and “pt”.

  • entities_definition_uri (str) – Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS.

  • inline_entities_definition (list[CustomEntity]) – The inline CustomEntity definition.

  • global_default_case_sensitive (bool) – A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value.

  • global_default_accent_sensitive (bool) – A global flag for AccentSensitive. If AccentSensitive is not set in CustomEntity, this value will be the default value.

  • global_default_fuzzy_edit_distance (int) – A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input text by CustomEntityLookupSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DA = 'da'

Danish

DE = 'de'

German

EN = 'en'

English

ES = 'es'

Spanish

FI = 'fi'

Finnish

FR = 'fr'

French

IT = 'it'

Italian

KO = 'ko'

Korean

PT = 'pt'

Portuguese

class azure.search.documents.indexes.models.DataChangeDetectionPolicy(**kwargs: Any)[source]

Base type for data change detection policies.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: HighWaterMarkChangeDetectionPolicy, SqlIntegratedChangeTrackingPolicy

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – A URI fragment specifying the type of data change detection policy. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DataDeletionDetectionPolicy(**kwargs: Any)[source]

Base type for data deletion detection policies.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SoftDeleteColumnDeletionDetectionPolicy

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – A URI fragment specifying the type of data deletion detection policy. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DefaultCognitiveServicesAccount(*, description: str | None = None, **kwargs: Any)[source]

An empty object that represents the default Azure AI service resource for a skillset.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of Azure AI service resource attached to a skillset. Required.

  • description (str) – Description of the Azure AI service resource attached to a skillset.

Keyword Arguments:

description (str) – Description of the Azure AI service resource attached to a skillset.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DictionaryDecompounderTokenFilter(*, name: str, word_list: List[str], min_word_size: int = 5, min_subword_size: int = 2, max_subword_size: int = 15, only_longest_match: bool = False, **kwargs: Any)[source]

Decomposes compound words found in many Germanic languages. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • word_list (list[str]) – The list of words to match against. Required.

  • min_word_size (int) – The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300.

  • min_subword_size (int) – The minimum subword size. Only subwords longer than this are outputted. Default is 2. Maximum is 300.

  • max_subword_size (int) – The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is 300.

  • only_longest_match (bool) – A value indicating whether to add only the longest matching subword to the output. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • word_list (list[str]) – The list of words to match against. Required.

  • min_word_size (int) – The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300.

  • min_subword_size (int) – The minimum subword size. Only subwords longer than this are outputted. Default is 2. Maximum is 300.

  • max_subword_size (int) – The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is 300.

  • only_longest_match (bool) – A value indicating whether to add only the longest matching subword to the output. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DistanceScoringFunction(*, field_name: str, boost: float, parameters: _models.DistanceScoringParameters, interpolation: str | _models.ScoringFunctionInterpolation | None = None, **kwargs: Any)[source]

Defines a function that boosts scores based on distance from a geographic location.

All required parameters must be populated in order to send to server.

Variables:
  • type (str) – Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. Required.

  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (DistanceScoringParameters) – Parameter values for the distance scoring function. Required.

Keyword Arguments:
  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (DistanceScoringParameters) – Parameter values for the distance scoring function. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DistanceScoringParameters(*, reference_point_parameter: str, boosting_distance: float, **kwargs: Any)[source]

Provides parameter values to a distance scoring function.

All required parameters must be populated in order to send to server.

Variables:
  • reference_point_parameter (str) – The name of the parameter passed in search queries to specify the reference location. Required.

  • boosting_distance (float) – The distance in kilometers from the reference location where the boosting range ends. Required.

Keyword Arguments:
  • reference_point_parameter (str) – The name of the parameter passed in search queries to specify the reference location. Required.

  • boosting_distance (float) – The distance in kilometers from the reference location where the boosting range ends. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.DocumentExtractionSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, parsing_mode: str | None = None, data_to_extract: str | None = None, configuration: Dict[str, Any] | None = None, **kwargs: Any)[source]

A skill that extracts content from a file within the enrichment pipeline.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • parsing_mode (str) – The parsingMode for the skill. Will be set to ‘default’ if not defined.

  • data_to_extract (str) – The type of data to be extracted for the skill. Will be set to ‘contentAndMetadata’ if not defined.

  • configuration (dict[str, any]) – A dictionary of configurations for the skill.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • parsing_mode (str) – The parsingMode for the skill. Will be set to ‘default’ if not defined.

  • data_to_extract (str) – The type of data to be extracted for the skill. Will be set to ‘contentAndMetadata’ if not defined.

  • configuration (dict[str, any]) – A dictionary of configurations for the skill.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.EdgeNGramTokenFilter(*, name: str, min_gram: int = 1, max_gram: int = 2, side: str | _models.EdgeNGramTokenFilterSide | None = None, **kwargs: Any)[source]

Generates n-grams of the given size(s) starting from the front or the back of an input token. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2.

  • side (str or EdgeNGramTokenFilterSide) – Specifies which side of the input the n-gram should be generated from. Default is “front”. Known values are: “front” and “back”.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2.

  • side (str or EdgeNGramTokenFilterSide) – Specifies which side of the input the n-gram should be generated from. Default is “front”. Known values are: “front” and “back”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.EdgeNGramTokenFilterSide(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies which side of the input an n-gram should be generated from.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

BACK = 'back'

Specifies that the n-gram should be generated from the back of the input.

FRONT = 'front'

Specifies that the n-gram should be generated from the front of the input.

class azure.search.documents.indexes.models.EdgeNGramTokenizer(*, name: str, min_gram: int = 1, max_gram: int = 2, token_chars: List[str | _models.TokenCharacterKind] | None = None, **kwargs: Any)[source]

Tokenizes the input from an edge into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2. Maximum is 300.

  • token_chars (list[str or TokenCharacterKind]) – Character classes to keep in the tokens.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2. Maximum is 300.

  • token_chars (list[str or TokenCharacterKind]) – Character classes to keep in the tokens.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ElisionTokenFilter(*, name: str, articles: List[str] | None = None, **kwargs: Any)[source]

Removes elisions. For example, “l’avion” (the plane) will be converted to “avion” (plane). This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • articles (list[str]) – The set of articles to remove.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • articles (list[str]) – The set of articles to remove.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.EntityCategory(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A string indicating what entity categories to return.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DATETIME = 'datetime'

Entities describing a date and time.

EMAIL = 'email'

Entities describing an email address.

LOCATION = 'location'

Entities describing a physical location.

ORGANIZATION = 'organization'

Entities describing an organization.

PERSON = 'person'

Entities describing a person.

QUANTITY = 'quantity'

Entities describing a quantity.

URL = 'url'

Entities describing a URL.

class azure.search.documents.indexes.models.EntityLinkingSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | None = None, minimum_precision: float | None = None, model_version: str | None = None, **kwargs: Any)[source]

Using the Text Analytics API, extracts linked entities from text.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str) – A value indicating which language code to use. Default is en.

  • minimum_precision (float) – A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str) – A value indicating which language code to use. Default is en.

  • minimum_precision (float) – A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.EntityRecognitionSkill(**kwargs)[source]

Using the Text Analytics API, extracts entities of different types from text.

All required parameters must be populated in order to send to Azure.

Variables:
  • odata_type (str) – Required. Identifies the concrete type of the skill.Constant filled by server.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill.

  • outputs (list[OutputFieldMappingEntry]) – Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill.

  • categories (list[str or EntityCategory]) – A list of entity categories that should be extracted.

  • default_language_code (str or EntityRecognitionSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “ar”, “cs”, “zh-Hans”, “zh-Hant”, “da”, “nl”, “en”, “fi”, “fr”, “de”, “el”, “hu”, “it”, “ja”, “ko”, “no”, “pl”, “pt-PT”, “pt-BR”, “ru”, “es”, “sv”, “tr”.

  • include_typeless_entities (bool) – Determines whether or not to include entities which are well known but don’t conform to a pre-defined type. If this configuration is not set (default), set to null or set to false, entities which don’t conform to one of the pre-defined types will not be surfaced. Only valid for skill version 1.

  • minimum_precision (float) – A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary. Only valid from skill version 3.

  • skill_version (EntityRecognitionSkillVersion) – The version of the skill to use when calling the Text Analytics service. It will default to V1 when not specified.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.EntityRecognitionSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Deprecated. The language codes supported for input text by EntityRecognitionSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AR = 'ar'

Arabic

CS = 'cs'

Czech

DA = 'da'

Danish

DE = 'de'

German

EL = 'el'

Greek

EN = 'en'

English

ES = 'es'

Spanish

FI = 'fi'

Finnish

FR = 'fr'

French

HU = 'hu'

Hungarian

IT = 'it'

Italian

JA = 'ja'

Japanese

KO = 'ko'

Korean

NL = 'nl'

Dutch

NO = 'no'

Norwegian (Bokmaal)

PL = 'pl'

Polish

PT_BR = 'pt-BR'

Portuguese (Brazil)

PT_PT = 'pt-PT'

Portuguese (Portugal)

RU = 'ru'

Russian

SV = 'sv'

Swedish

TR = 'tr'

Turkish

ZH_HANS = 'zh-Hans'

Chinese-Simplified

ZH_HANT = 'zh-Hant'

Chinese-Traditional

class azure.search.documents.indexes.models.EntityRecognitionSkillVersion(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies the Entity Recognition skill version to use.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

LATEST = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill'

Use latest version of Entity Recognition skill.

V1 = '#Microsoft.Skills.Text.EntityRecognitionSkill'
V3 = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill'

Use Entity Recognition skill V3.

class azure.search.documents.indexes.models.ExhaustiveKnnAlgorithmConfiguration(*, name: str, parameters: _models.ExhaustiveKnnParameters | None = None, **kwargs: Any)[source]

Contains configuration options specific to the exhaustive KNN algorithm used during querying, which will perform brute-force search across the entire vector index.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchAlgorithmKind) – The name of the kind of algorithm being configured for use with vector search. Required. Known values are: “hnsw” and “exhaustiveKnn”.

  • parameters (ExhaustiveKnnParameters) – Contains the parameters specific to exhaustive KNN algorithm.

Keyword Arguments:
  • name (str) – The name to associate with this particular configuration. Required.

  • parameters (ExhaustiveKnnParameters) – Contains the parameters specific to exhaustive KNN algorithm.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ExhaustiveKnnParameters(*, metric: str | _models.VectorSearchAlgorithmMetric | None = None, **kwargs: Any)[source]

Contains the parameters specific to exhaustive KNN algorithm.

Variables:

metric (str or VectorSearchAlgorithmMetric) – The similarity metric to use for vector comparisons. Known values are: “cosine”, “euclidean”, “dotProduct”, and “hamming”.

Keyword Arguments:

metric (str or VectorSearchAlgorithmMetric) – The similarity metric to use for vector comparisons. Known values are: “cosine”, “euclidean”, “dotProduct”, and “hamming”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.FieldMapping(*, source_field_name: str, target_field_name: str | None = None, mapping_function: _models.FieldMappingFunction | None = None, **kwargs: Any)[source]

Defines a mapping between a field in a data source and a target field in an index.

All required parameters must be populated in order to send to server.

Variables:
  • source_field_name (str) – The name of the field in the data source. Required.

  • target_field_name (str) – The name of the target field in the index. Same as the source field name by default.

  • mapping_function (FieldMappingFunction) – A function to apply to each source field value before indexing.

Keyword Arguments:
  • source_field_name (str) – The name of the field in the data source. Required.

  • target_field_name (str) – The name of the target field in the index. Same as the source field name by default.

  • mapping_function (FieldMappingFunction) – A function to apply to each source field value before indexing.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.FieldMappingFunction(*, name: str, parameters: Dict[str, Any] | None = None, **kwargs: Any)[source]

Represents a function that transforms a value from a data source before indexing.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the field mapping function. Required.

  • parameters (dict[str, any]) – A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type.

Keyword Arguments:
  • name (str) – The name of the field mapping function. Required.

  • parameters (dict[str, any]) – A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.FreshnessScoringFunction(*, field_name: str, boost: float, parameters: _models.FreshnessScoringParameters, interpolation: str | _models.ScoringFunctionInterpolation | None = None, **kwargs: Any)[source]

Defines a function that boosts scores based on the value of a date-time field.

All required parameters must be populated in order to send to server.

Variables:
  • type (str) – Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. Required.

  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (FreshnessScoringParameters) – Parameter values for the freshness scoring function. Required.

Keyword Arguments:
  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (FreshnessScoringParameters) – Parameter values for the freshness scoring function. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.FreshnessScoringParameters(*, boosting_duration: timedelta, **kwargs: Any)[source]

Provides parameter values to a freshness scoring function.

All required parameters must be populated in order to send to server.

Variables:

boosting_duration (timedelta) – The expiration period after which boosting will stop for a particular document. Required.

Keyword Arguments:

boosting_duration (timedelta) – The expiration period after which boosting will stop for a particular document. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.GetIndexStatisticsResult(**kwargs: Any)[source]

Statistics for a given index. Statistics are collected periodically and are not guaranteed to always be up-to-date.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • document_count (int) – The number of documents in the index. Required.

  • storage_size (int) – The amount of storage in bytes consumed by the index. Required.

  • vector_index_size (int) – The amount of memory in bytes consumed by vectors in the index. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.HighWaterMarkChangeDetectionPolicy(*, high_water_mark_column_name: str, **kwargs: Any)[source]

Defines a data change detection policy that captures changes based on the value of a high water mark column.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of data change detection policy. Required.

  • high_water_mark_column_name (str) – The name of the high water mark column. Required.

Keyword Arguments:

high_water_mark_column_name (str) – The name of the high water mark column. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.HnswAlgorithmConfiguration(*, name: str, parameters: _models.HnswParameters | None = None, **kwargs: Any)[source]

Contains configuration options specific to the HNSW approximate nearest neighbors algorithm used during indexing and querying. The HNSW algorithm offers a tunable trade-off between search speed and accuracy.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchAlgorithmKind) – The name of the kind of algorithm being configured for use with vector search. Required. Known values are: “hnsw” and “exhaustiveKnn”.

  • parameters (HnswParameters) – Contains the parameters specific to HNSW algorithm.

Keyword Arguments:
  • name (str) – The name to associate with this particular configuration. Required.

  • parameters (HnswParameters) – Contains the parameters specific to HNSW algorithm.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.HnswParameters(*, m: int = 4, ef_construction: int = 400, ef_search: int = 500, metric: str | _models.VectorSearchAlgorithmMetric | None = None, **kwargs: Any)[source]

Contains the parameters specific to the HNSW algorithm.

Variables:
  • m (int) – The number of bi-directional links created for every new element during construction. Increasing this parameter value may improve recall and reduce retrieval times for datasets with high intrinsic dimensionality at the expense of increased memory consumption and longer indexing time.

  • ef_construction (int) – The size of the dynamic list containing the nearest neighbors, which is used during index time. Increasing this parameter may improve index quality, at the expense of increased indexing time. At a certain point, increasing this parameter leads to diminishing returns.

  • ef_search (int) – The size of the dynamic list containing the nearest neighbors, which is used during search time. Increasing this parameter may improve search results, at the expense of slower search. At a certain point, increasing this parameter leads to diminishing returns.

  • metric (str or VectorSearchAlgorithmMetric) – The similarity metric to use for vector comparisons. Known values are: “cosine”, “euclidean”, “dotProduct”, and “hamming”.

Keyword Arguments:
  • m (int) – The number of bi-directional links created for every new element during construction. Increasing this parameter value may improve recall and reduce retrieval times for datasets with high intrinsic dimensionality at the expense of increased memory consumption and longer indexing time.

  • ef_construction (int) – The size of the dynamic list containing the nearest neighbors, which is used during index time. Increasing this parameter may improve index quality, at the expense of increased indexing time. At a certain point, increasing this parameter leads to diminishing returns.

  • ef_search (int) – The size of the dynamic list containing the nearest neighbors, which is used during search time. Increasing this parameter may improve search results, at the expense of slower search. At a certain point, increasing this parameter leads to diminishing returns.

  • metric (str or VectorSearchAlgorithmMetric) – The similarity metric to use for vector comparisons. Known values are: “cosine”, “euclidean”, “dotProduct”, and “hamming”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ImageAnalysisSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | _models.ImageAnalysisSkillLanguage | None = None, visual_features: List[str | _models.VisualFeature] | None = None, details: List[str | _models.ImageDetail] | None = None, **kwargs: Any)[source]

A skill that analyzes image files. It extracts a rich set of visual features based on the image content.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or ImageAnalysisSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “ar”, “az”, “bg”, “bs”, “ca”, “cs”, “cy”, “da”, “de”, “el”, “en”, “es”, “et”, “eu”, “fi”, “fr”, “ga”, “gl”, “he”, “hi”, “hr”, “hu”, “id”, “it”, “ja”, “kk”, “ko”, “lt”, “lv”, “mk”, “ms”, “nb”, “nl”, “pl”, “prs”, “pt-BR”, “pt”, “pt-PT”, “ro”, “ru”, “sk”, “sl”, “sr-Cyrl”, “sr-Latn”, “sv”, “th”, “tr”, “uk”, “vi”, “zh”, “zh-Hans”, and “zh-Hant”.

  • visual_features (list[str or VisualFeature]) – A list of visual features.

  • details (list[str or ImageDetail]) – A string indicating which domain-specific details to return.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or ImageAnalysisSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “ar”, “az”, “bg”, “bs”, “ca”, “cs”, “cy”, “da”, “de”, “el”, “en”, “es”, “et”, “eu”, “fi”, “fr”, “ga”, “gl”, “he”, “hi”, “hr”, “hu”, “id”, “it”, “ja”, “kk”, “ko”, “lt”, “lv”, “mk”, “ms”, “nb”, “nl”, “pl”, “prs”, “pt-BR”, “pt”, “pt-PT”, “ro”, “ru”, “sk”, “sl”, “sr-Cyrl”, “sr-Latn”, “sv”, “th”, “tr”, “uk”, “vi”, “zh”, “zh-Hans”, and “zh-Hant”.

  • visual_features (list[str or VisualFeature]) – A list of visual features.

  • details (list[str or ImageDetail]) – A string indicating which domain-specific details to return.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ImageAnalysisSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input by ImageAnalysisSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AR = 'ar'

Arabic

AZ = 'az'

Azerbaijani

BG = 'bg'

Bulgarian

BS = 'bs'

Bosnian Latin

CA = 'ca'

Catalan

CS = 'cs'

Czech

CY = 'cy'

Welsh

DA = 'da'

Danish

DE = 'de'

German

EL = 'el'

Greek

EN = 'en'

English

ES = 'es'

Spanish

ET = 'et'

Estonian

EU = 'eu'

Basque

FI = 'fi'

Finnish

FR = 'fr'

French

GA = 'ga'

Irish

GL = 'gl'

Galician

HE = 'he'

Hebrew

HI = 'hi'

Hindi

HR = 'hr'

Croatian

HU = 'hu'

Hungarian

ID = 'id'

Indonesian

IT = 'it'

Italian

JA = 'ja'

Japanese

KK = 'kk'

Kazakh

KO = 'ko'

Korean

LT = 'lt'

Lithuanian

LV = 'lv'

Latvian

MK = 'mk'

Macedonian

MS = 'ms'

Malay Malaysia

NB = 'nb'

Norwegian (Bokmal)

NL = 'nl'

Dutch

PL = 'pl'

Polish

PRS = 'prs'

Dari

PT = 'pt'

Portuguese-Portugal

PT_BR = 'pt-BR'

Portuguese-Brazil

PT_PT = 'pt-PT'

Portuguese-Portugal

RO = 'ro'

Romanian

RU = 'ru'

Russian

SK = 'sk'

Slovak

SL = 'sl'

Slovenian

SR_CYRL = 'sr-Cyrl'

Serbian - Cyrillic RS

SR_LATN = 'sr-Latn'

Serbian - Latin RS

SV = 'sv'

Swedish

TH = 'th'

Thai

TR = 'tr'

Turkish

UK = 'uk'

Ukrainian

VI = 'vi'

Vietnamese

ZH = 'zh'

Chinese Simplified

ZH_HANS = 'zh-Hans'

Chinese Simplified

ZH_HANT = 'zh-Hant'

Chinese Traditional

class azure.search.documents.indexes.models.ImageDetail(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A string indicating which domain-specific details to return.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CELEBRITIES = 'celebrities'

Details recognized as celebrities.

LANDMARKS = 'landmarks'

Details recognized as landmarks.

class azure.search.documents.indexes.models.IndexProjectionMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines behavior of the index projections in relation to the rest of the indexer.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

INCLUDE_INDEXING_PARENT_DOCUMENTS = 'includeIndexingParentDocuments'

The source document will be written into the indexer’s target index. This is the default pattern.

SKIP_INDEXING_PARENT_DOCUMENTS = 'skipIndexingParentDocuments'

The source document will be skipped from writing into the indexer’s target index.

class azure.search.documents.indexes.models.IndexerExecutionEnvironment(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies the environment in which the indexer should execute.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

PRIVATE = 'private'

Indicates that the indexer should run with the environment provisioned specifically for the search service. This should only be specified as the execution environment if the indexer needs to access resources securely over shared private link resources.

STANDARD = 'standard'

Indicates that the search service can determine where the indexer should execute. This is the default environment when nothing is specified and is the recommended value.

class azure.search.documents.indexes.models.IndexerExecutionResult(**kwargs: Any)[source]

Represents the result of an individual indexer execution.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • status (str or IndexerExecutionStatus) – The outcome of this indexer execution. Required. Known values are: “transientFailure”, “success”, “inProgress”, and “reset”.

  • error_message (str) – The error message indicating the top-level error, if any.

  • start_time (datetime) – The start time of this indexer execution.

  • end_time (datetime) – The end time of this indexer execution, if the execution has already completed.

  • errors (list[SearchIndexerError]) – The item-level indexing errors. Required.

  • warnings (list[SearchIndexerWarning]) – The item-level indexing warnings. Required.

  • item_count (int) – The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. Required.

  • failed_item_count (int) – The number of items that failed to be indexed during this indexer execution. Required.

  • initial_tracking_state (str) – Change tracking state with which an indexer execution started.

  • final_tracking_state (str) – Change tracking state with which an indexer execution finished.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.IndexerExecutionStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Represents the status of an individual indexer execution.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

IN_PROGRESS = 'inProgress'

Indexer execution is in progress.

RESET = 'reset'

Indexer has been reset.

SUCCESS = 'success'

Indexer execution completed successfully.

TRANSIENT_FAILURE = 'transientFailure'

An indexer invocation has failed, but the failure may be transient. Indexer invocations will continue per schedule.

class azure.search.documents.indexes.models.IndexerStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Represents the overall indexer status.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ERROR = 'error'

Indicates that the indexer experienced an error that cannot be corrected without human intervention.

RUNNING = 'running'

Indicates that the indexer is running normally.

UNKNOWN = 'unknown'

Indicates that the indexer is in an unknown state.

class azure.search.documents.indexes.models.IndexingParameters(*, batch_size: int | None = None, max_failed_items: int = 0, max_failed_items_per_batch: int = 0, configuration: _models.IndexingParametersConfiguration | None = None, **kwargs: Any)[source]

Represents parameters for indexer execution.

Variables:
  • batch_size (int) – The number of items that are read from the data source and indexed as a single batch in order to improve performance. The default depends on the data source type.

  • max_failed_items (int) – The maximum number of items that can fail indexing for indexer execution to still be considered successful. -1 means no limit. Default is 0.

  • max_failed_items_per_batch (int) – The maximum number of items in a single batch that can fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0.

  • configuration (IndexingParametersConfiguration) – A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type.

Keyword Arguments:
  • batch_size (int) – The number of items that are read from the data source and indexed as a single batch in order to improve performance. The default depends on the data source type.

  • max_failed_items (int) – The maximum number of items that can fail indexing for indexer execution to still be considered successful. -1 means no limit. Default is 0.

  • max_failed_items_per_batch (int) – The maximum number of items in a single batch that can fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0.

  • configuration (IndexingParametersConfiguration) – A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.IndexingParametersConfiguration(*, additional_properties: Dict[str, Any] | None = None, parsing_mode: str | _models.BlobIndexerParsingMode = 'default', excluded_file_name_extensions: str = '', indexed_file_name_extensions: str = '', fail_on_unsupported_content_type: bool = False, fail_on_unprocessable_document: bool = False, index_storage_metadata_only_for_oversized_documents: bool = False, delimited_text_headers: str | None = None, delimited_text_delimiter: str | None = None, first_line_contains_headers: bool = True, document_root: str | None = None, data_to_extract: str | _models.BlobIndexerDataToExtract = 'contentAndMetadata', image_action: str | _models.BlobIndexerImageAction = 'none', allow_skillset_to_read_file_data: bool = False, pdf_text_rotation_algorithm: str | _models.BlobIndexerPDFTextRotationAlgorithm = 'none', execution_environment: str | _models.IndexerExecutionEnvironment = 'standard', query_timeout: str = '00:05:00', **kwargs: Any)[source]

A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type.

Variables:
  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • parsing_mode (str or BlobIndexerParsingMode) – Represents the parsing mode for indexing from an Azure blob data source. Known values are: “default”, “text”, “delimitedText”, “json”, “jsonArray”, and “jsonLines”.

  • excluded_file_name_extensions (str) – Comma-delimited list of filename extensions to ignore when processing from Azure blob storage. For example, you could exclude “.png, .mp4” to skip over those files during indexing.

  • indexed_file_name_extensions (str) – Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files “.docx, .pptx, .msg” to specifically include those file types.

  • fail_on_unsupported_content_type (bool) – For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don’t know all the content types (file extensions) in advance.

  • fail_on_unprocessable_document (bool) – For Azure blobs, set to false if you want to continue indexing if a document fails indexing.

  • index_storage_metadata_only_for_oversized_documents (bool) – For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://learn.microsoft.com/azure/search/search-limits-quotas-capacity.

  • delimited_text_headers (str) – For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index.

  • delimited_text_delimiter (str) – For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, “|”).

  • first_line_contains_headers (bool) – For CSV blobs, indicates that the first (non-blank) line of each blob contains headers.

  • document_root (str) – For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property.

  • data_to_extract (str or BlobIndexerDataToExtract) – Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when “imageAction” is set to a value other than “none”. This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. Known values are: “storageMetadata”, “allMetadata”, and “contentAndMetadata”.

  • image_action (str or BlobIndexerImageAction) – Determines how to process embedded images and image files in Azure blob storage. Setting the “imageAction” configuration to any value other than “none” requires that a skillset also be attached to that indexer. Known values are: “none”, “generateNormalizedImages”, and “generateNormalizedImagePerPage”.

  • allow_skillset_to_read_file_data (bool) – If true, will create a path //document//file_data that is an object representing the original file data downloaded from your blob data source. This allows you to pass the original file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill.

  • pdf_text_rotation_algorithm (str or BlobIndexerPDFTextRotationAlgorithm) – Determines algorithm for text extraction from PDF files in Azure blob storage. Known values are: “none” and “detectAngles”.

  • execution_environment (str or IndexerExecutionEnvironment) – Specifies the environment in which the indexer should execute. Known values are: “standard” and “private”.

  • query_timeout (str) – Increases the timeout beyond the 5-minute default for Azure SQL database data sources, specified in the format “hh:mm:ss”.

Keyword Arguments:
  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • parsing_mode (str or BlobIndexerParsingMode) – Represents the parsing mode for indexing from an Azure blob data source. Known values are: “default”, “text”, “delimitedText”, “json”, “jsonArray”, and “jsonLines”.

  • excluded_file_name_extensions (str) – Comma-delimited list of filename extensions to ignore when processing from Azure blob storage. For example, you could exclude “.png, .mp4” to skip over those files during indexing.

  • indexed_file_name_extensions (str) – Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files “.docx, .pptx, .msg” to specifically include those file types.

  • fail_on_unsupported_content_type (bool) – For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don’t know all the content types (file extensions) in advance.

  • fail_on_unprocessable_document (bool) – For Azure blobs, set to false if you want to continue indexing if a document fails indexing.

  • index_storage_metadata_only_for_oversized_documents (bool) – For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://learn.microsoft.com/azure/search/search-limits-quotas-capacity.

  • delimited_text_headers (str) – For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index.

  • delimited_text_delimiter (str) – For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, “|”).

  • first_line_contains_headers (bool) – For CSV blobs, indicates that the first (non-blank) line of each blob contains headers.

  • document_root (str) – For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property.

  • data_to_extract (str or BlobIndexerDataToExtract) – Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when “imageAction” is set to a value other than “none”. This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. Known values are: “storageMetadata”, “allMetadata”, and “contentAndMetadata”.

  • image_action (str or BlobIndexerImageAction) – Determines how to process embedded images and image files in Azure blob storage. Setting the “imageAction” configuration to any value other than “none” requires that a skillset also be attached to that indexer. Known values are: “none”, “generateNormalizedImages”, and “generateNormalizedImagePerPage”.

  • allow_skillset_to_read_file_data (bool) – If true, will create a path //document//file_data that is an object representing the original file data downloaded from your blob data source. This allows you to pass the original file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill.

  • pdf_text_rotation_algorithm (str or BlobIndexerPDFTextRotationAlgorithm) – Determines algorithm for text extraction from PDF files in Azure blob storage. Known values are: “none” and “detectAngles”.

  • execution_environment (str or IndexerExecutionEnvironment) – Specifies the environment in which the indexer should execute. Known values are: “standard” and “private”.

  • query_timeout (str) – Increases the timeout beyond the 5-minute default for Azure SQL database data sources, specified in the format “hh:mm:ss”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.IndexingSchedule(*, interval: timedelta, start_time: datetime | None = None, **kwargs: Any)[source]

Represents a schedule for indexer execution.

All required parameters must be populated in order to send to server.

Variables:
  • interval (timedelta) – The interval of time between indexer executions. Required.

  • start_time (datetime) – The time when an indexer should start running.

Keyword Arguments:
  • interval (timedelta) – The interval of time between indexer executions. Required.

  • start_time (datetime) – The time when an indexer should start running.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.InputFieldMappingEntry(*, name: str, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Input field mapping for a skill.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the input. Required.

  • source (str) – The source of the input.

  • source_context (str) – The source context used for selecting recursive inputs.

  • inputs (list[InputFieldMappingEntry]) – The recursive inputs used when creating a complex type.

Keyword Arguments:
  • name (str) – The name of the input. Required.

  • source (str) – The source of the input.

  • source_context (str) – The source context used for selecting recursive inputs.

  • inputs (list[InputFieldMappingEntry]) – The recursive inputs used when creating a complex type.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.KeepTokenFilter(*, name: str, keep_words: List[str], lower_case_keep_words: bool = False, **kwargs: Any)[source]

A token filter that only keeps tokens with text contained in a specified list of words. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • keep_words (list[str]) – The list of words to keep. Required.

  • lower_case_keep_words (bool) – A value indicating whether to lower case all words first. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • keep_words (list[str]) – The list of words to keep. Required.

  • lower_case_keep_words (bool) – A value indicating whether to lower case all words first. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.KeyPhraseExtractionSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | _models.KeyPhraseExtractionSkillLanguage | None = None, max_key_phrase_count: int | None = None, model_version: str | None = None, **kwargs: Any)[source]

A skill that uses text analytics for key phrase extraction.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or KeyPhraseExtractionSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “da”, “nl”, “en”, “fi”, “fr”, “de”, “it”, “ja”, “ko”, “no”, “pl”, “pt-PT”, “pt-BR”, “ru”, “es”, and “sv”.

  • max_key_phrase_count (int) – A number indicating how many key phrases to return. If absent, all identified key phrases will be returned.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or KeyPhraseExtractionSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “da”, “nl”, “en”, “fi”, “fr”, “de”, “it”, “ja”, “ko”, “no”, “pl”, “pt-PT”, “pt-BR”, “ru”, “es”, and “sv”.

  • max_key_phrase_count (int) – A number indicating how many key phrases to return. If absent, all identified key phrases will be returned.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input text by KeyPhraseExtractionSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DA = 'da'

Danish

DE = 'de'

German

EN = 'en'

English

ES = 'es'

Spanish

FI = 'fi'

Finnish

FR = 'fr'

French

IT = 'it'

Italian

JA = 'ja'

Japanese

KO = 'ko'

Korean

NL = 'nl'

Dutch

NO = 'no'

Norwegian (Bokmaal)

PL = 'pl'

Polish

PT_BR = 'pt-BR'

Portuguese (Brazil)

PT_PT = 'pt-PT'

Portuguese (Portugal)

RU = 'ru'

Russian

SV = 'sv'

Swedish

class azure.search.documents.indexes.models.KeywordMarkerTokenFilter(*, name: str, keywords: List[str], ignore_case: bool = False, **kwargs: Any)[source]

Marks terms as keywords. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • keywords (list[str]) – A list of words to mark as keywords. Required.

  • ignore_case (bool) – A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • keywords (list[str]) – A list of words to mark as keywords. Required.

  • ignore_case (bool) – A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.KeywordTokenizer(*, name: str, max_token_length: int = 256, **kwargs: Any)[source]
Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 256. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LanguageDetectionSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_country_hint: str | None = None, model_version: str | None = None, **kwargs: Any)[source]

A skill that detects the language of input text and reports a single language code for every document submitted on the request. The language code is paired with a score indicating the confidence of the analysis.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_country_hint (str) – A country code to use as a hint to the language detection model if it cannot disambiguate the language.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_country_hint (str) – A country code to use as a hint to the language detection model if it cannot disambiguate the language.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LengthTokenFilter(*, name: str, min_length: int = 0, max_length: int = 300, **kwargs: Any)[source]

Removes words that are too long or too short. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_length (int) – The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.

  • max_length (int) – The maximum length in characters. Default and maximum is 300.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_length (int) – The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.

  • max_length (int) – The maximum length in characters. Default and maximum is 300.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LexicalAnalyzer(*, name: str, **kwargs: Any)[source]

Base type for analyzers.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CustomAnalyzer, PatternAnalyzer, LuceneStandardAnalyzer, StopAnalyzer

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of analyzer. Required.

  • name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

Keyword Arguments:

name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LexicalAnalyzerName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the names of all text analyzers supported by the search engine.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AR_LUCENE = 'ar.lucene'

Lucene analyzer for Arabic.

AR_MICROSOFT = 'ar.microsoft'

Microsoft analyzer for Arabic.

BG_LUCENE = 'bg.lucene'

Lucene analyzer for Bulgarian.

BG_MICROSOFT = 'bg.microsoft'

Microsoft analyzer for Bulgarian.

BN_MICROSOFT = 'bn.microsoft'

Microsoft analyzer for Bangla.

CA_LUCENE = 'ca.lucene'

Lucene analyzer for Catalan.

CA_MICROSOFT = 'ca.microsoft'

Microsoft analyzer for Catalan.

CS_LUCENE = 'cs.lucene'

Lucene analyzer for Czech.

CS_MICROSOFT = 'cs.microsoft'

Microsoft analyzer for Czech.

DA_LUCENE = 'da.lucene'

Lucene analyzer for Danish.

DA_MICROSOFT = 'da.microsoft'

Microsoft analyzer for Danish.

DE_LUCENE = 'de.lucene'

Lucene analyzer for German.

DE_MICROSOFT = 'de.microsoft'

Microsoft analyzer for German.

EL_LUCENE = 'el.lucene'

Lucene analyzer for Greek.

EL_MICROSOFT = 'el.microsoft'

Microsoft analyzer for Greek.

EN_LUCENE = 'en.lucene'

Lucene analyzer for English.

EN_MICROSOFT = 'en.microsoft'

Microsoft analyzer for English.

ES_LUCENE = 'es.lucene'

Lucene analyzer for Spanish.

ES_MICROSOFT = 'es.microsoft'

Microsoft analyzer for Spanish.

ET_MICROSOFT = 'et.microsoft'

Microsoft analyzer for Estonian.

EU_LUCENE = 'eu.lucene'

Lucene analyzer for Basque.

FA_LUCENE = 'fa.lucene'

Lucene analyzer for Persian.

FI_LUCENE = 'fi.lucene'

Lucene analyzer for Finnish.

FI_MICROSOFT = 'fi.microsoft'

Microsoft analyzer for Finnish.

FR_LUCENE = 'fr.lucene'

Lucene analyzer for French.

FR_MICROSOFT = 'fr.microsoft'

Microsoft analyzer for French.

GA_LUCENE = 'ga.lucene'

Lucene analyzer for Irish.

GL_LUCENE = 'gl.lucene'

Lucene analyzer for Galician.

GU_MICROSOFT = 'gu.microsoft'

Microsoft analyzer for Gujarati.

HE_MICROSOFT = 'he.microsoft'

Microsoft analyzer for Hebrew.

HI_LUCENE = 'hi.lucene'

Lucene analyzer for Hindi.

HI_MICROSOFT = 'hi.microsoft'

Microsoft analyzer for Hindi.

HR_MICROSOFT = 'hr.microsoft'

Microsoft analyzer for Croatian.

HU_LUCENE = 'hu.lucene'

Lucene analyzer for Hungarian.

HU_MICROSOFT = 'hu.microsoft'

Microsoft analyzer for Hungarian.

HY_LUCENE = 'hy.lucene'

Lucene analyzer for Armenian.

ID_LUCENE = 'id.lucene'

Lucene analyzer for Indonesian.

ID_MICROSOFT = 'id.microsoft'

Microsoft analyzer for Indonesian (Bahasa).

IS_MICROSOFT = 'is.microsoft'

Microsoft analyzer for Icelandic.

IT_LUCENE = 'it.lucene'

Lucene analyzer for Italian.

IT_MICROSOFT = 'it.microsoft'

Microsoft analyzer for Italian.

JA_LUCENE = 'ja.lucene'

Lucene analyzer for Japanese.

JA_MICROSOFT = 'ja.microsoft'

Microsoft analyzer for Japanese.

KEYWORD = 'keyword'

Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/KeywordAnalyzer.html

KN_MICROSOFT = 'kn.microsoft'

Microsoft analyzer for Kannada.

KO_LUCENE = 'ko.lucene'

Lucene analyzer for Korean.

KO_MICROSOFT = 'ko.microsoft'

Microsoft analyzer for Korean.

LT_MICROSOFT = 'lt.microsoft'

Microsoft analyzer for Lithuanian.

LV_LUCENE = 'lv.lucene'

Lucene analyzer for Latvian.

LV_MICROSOFT = 'lv.microsoft'

Microsoft analyzer for Latvian.

ML_MICROSOFT = 'ml.microsoft'

Microsoft analyzer for Malayalam.

MR_MICROSOFT = 'mr.microsoft'

Microsoft analyzer for Marathi.

MS_MICROSOFT = 'ms.microsoft'

Microsoft analyzer for Malay (Latin).

NB_MICROSOFT = 'nb.microsoft'

Microsoft analyzer for Norwegian (Bokmål).

NL_LUCENE = 'nl.lucene'

Lucene analyzer for Dutch.

NL_MICROSOFT = 'nl.microsoft'

Microsoft analyzer for Dutch.

NO_LUCENE = 'no.lucene'

Lucene analyzer for Norwegian.

PATTERN = 'pattern'

Flexibly separates text into terms via a regular expression pattern. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/PatternAnalyzer.html

PA_MICROSOFT = 'pa.microsoft'

Microsoft analyzer for Punjabi.

PL_LUCENE = 'pl.lucene'

Lucene analyzer for Polish.

PL_MICROSOFT = 'pl.microsoft'

Microsoft analyzer for Polish.

PT_BR_LUCENE = 'pt-BR.lucene'

Lucene analyzer for Portuguese (Brazil).

PT_BR_MICROSOFT = 'pt-BR.microsoft'

Microsoft analyzer for Portuguese (Brazil).

PT_PT_LUCENE = 'pt-PT.lucene'

Lucene analyzer for Portuguese (Portugal).

PT_PT_MICROSOFT = 'pt-PT.microsoft'

Microsoft analyzer for Portuguese (Portugal).

RO_LUCENE = 'ro.lucene'

Lucene analyzer for Romanian.

RO_MICROSOFT = 'ro.microsoft'

Microsoft analyzer for Romanian.

RU_LUCENE = 'ru.lucene'

Lucene analyzer for Russian.

RU_MICROSOFT = 'ru.microsoft'

Microsoft analyzer for Russian.

SIMPLE = 'simple'

Divides text at non-letters and converts them to lower case. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/SimpleAnalyzer.html

SK_MICROSOFT = 'sk.microsoft'

Microsoft analyzer for Slovak.

SL_MICROSOFT = 'sl.microsoft'

Microsoft analyzer for Slovenian.

SR_CYRILLIC_MICROSOFT = 'sr-cyrillic.microsoft'

Microsoft analyzer for Serbian (Cyrillic).

SR_LATIN_MICROSOFT = 'sr-latin.microsoft'

Microsoft analyzer for Serbian (Latin).

STANDARD_ASCII_FOLDING_LUCENE = 'standardasciifolding.lucene'

Standard ASCII Folding Lucene analyzer. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#Analyzers

STANDARD_LUCENE = 'standard.lucene'

Standard Lucene analyzer.

STOP = 'stop'

Divides text at non-letters; Applies the lowercase and stopword token filters. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopAnalyzer.html

SV_LUCENE = 'sv.lucene'

Lucene analyzer for Swedish.

SV_MICROSOFT = 'sv.microsoft'

Microsoft analyzer for Swedish.

TA_MICROSOFT = 'ta.microsoft'

Microsoft analyzer for Tamil.

TE_MICROSOFT = 'te.microsoft'

Microsoft analyzer for Telugu.

TH_LUCENE = 'th.lucene'

Lucene analyzer for Thai.

TH_MICROSOFT = 'th.microsoft'

Microsoft analyzer for Thai.

TR_LUCENE = 'tr.lucene'

Lucene analyzer for Turkish.

TR_MICROSOFT = 'tr.microsoft'

Microsoft analyzer for Turkish.

UK_MICROSOFT = 'uk.microsoft'

Microsoft analyzer for Ukrainian.

UR_MICROSOFT = 'ur.microsoft'

Microsoft analyzer for Urdu.

VI_MICROSOFT = 'vi.microsoft'

Microsoft analyzer for Vietnamese.

WHITESPACE = 'whitespace'

An analyzer that uses the whitespace tokenizer. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceAnalyzer.html

ZH_HANS_LUCENE = 'zh-Hans.lucene'

Lucene analyzer for Chinese (Simplified).

ZH_HANS_MICROSOFT = 'zh-Hans.microsoft'

Microsoft analyzer for Chinese (Simplified).

ZH_HANT_LUCENE = 'zh-Hant.lucene'

Lucene analyzer for Chinese (Traditional).

ZH_HANT_MICROSOFT = 'zh-Hant.microsoft'

Microsoft analyzer for Chinese (Traditional).

class azure.search.documents.indexes.models.LexicalTokenizer(*, name: str, **kwargs: Any)[source]

Base type for tokenizers.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ClassicTokenizer, EdgeNGramTokenizer, KeywordTokenizer, KeywordTokenizerV2, MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, NGramTokenizer, PathHierarchyTokenizerV2, PatternTokenizer, LuceneStandardTokenizer, LuceneStandardTokenizerV2, UaxUrlEmailTokenizer

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

Keyword Arguments:

name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LexicalTokenizerName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the names of all tokenizers supported by the search engine.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CLASSIC = 'classic'

Grammar-based tokenizer that is suitable for processing most European-language documents. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicTokenizer.html

EDGE_N_GRAM = 'edgeNGram'

Tokenizes the input from an edge into n-grams of the given size(s). See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.html

KEYWORD = 'keyword_v2'

Emits the entire input as a single token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/KeywordTokenizer.html

LETTER = 'letter'

Divides text at non-letters. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LetterTokenizer.html

LOWERCASE = 'lowercase'

Divides text at non-letters and converts them to lower case. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LowerCaseTokenizer.html

MICROSOFT_LANGUAGE_STEMMING_TOKENIZER = 'microsoft_language_stemming_tokenizer'

Divides text using language-specific rules and reduces words to their base forms.

MICROSOFT_LANGUAGE_TOKENIZER = 'microsoft_language_tokenizer'

Divides text using language-specific rules.

N_GRAM = 'nGram'

Tokenizes the input into n-grams of the given size(s). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenizer.html

PATH_HIERARCHY = 'path_hierarchy_v2'

Tokenizer for path-like hierarchies. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/path/PathHierarchyTokenizer.html

PATTERN = 'pattern'

Tokenizer that uses regex pattern matching to construct distinct tokens. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/pattern/PatternTokenizer.html

STANDARD = 'standard_v2'

Standard Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop filter. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/StandardTokenizer.html

UAX_URL_EMAIL = 'uax_url_email'

Tokenizes urls and emails as one token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.html

WHITESPACE = 'whitespace'

Divides text at whitespace. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceTokenizer.html

class azure.search.documents.indexes.models.LimitTokenFilter(*, name: str, max_token_count: int = 1, consume_all_tokens: bool = False, **kwargs: Any)[source]

Limits the number of tokens while indexing. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_count (int) – The maximum number of tokens to produce. Default is 1.

  • consume_all_tokens (bool) – A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_count (int) – The maximum number of tokens to produce. Default is 1.

  • consume_all_tokens (bool) – A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LuceneStandardAnalyzer(*, name: str, max_token_length: int = 255, stopwords: List[str] | None = None, **kwargs: Any)[source]

Standard Apache Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop filter.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of analyzer. Required.

  • name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

  • stopwords (list[str]) – A list of stopwords.

Keyword Arguments:
  • name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

  • stopwords (list[str]) – A list of stopwords.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.LuceneStandardTokenizer(*, name: str, max_token_length: int = 255, **kwargs: Any)[source]

Breaks text following the Unicode Text Segmentation rules. This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MagnitudeScoringFunction(*, field_name: str, boost: float, parameters: _models.MagnitudeScoringParameters, interpolation: str | _models.ScoringFunctionInterpolation | None = None, **kwargs: Any)[source]

Defines a function that boosts scores based on the magnitude of a numeric field.

All required parameters must be populated in order to send to server.

Variables:
  • type (str) – Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. Required.

  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (MagnitudeScoringParameters) – Parameter values for the magnitude scoring function. Required.

Keyword Arguments:
  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (MagnitudeScoringParameters) – Parameter values for the magnitude scoring function. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MagnitudeScoringParameters(*, boosting_range_start: float, boosting_range_end: float, should_boost_beyond_range_by_constant: bool | None = None, **kwargs: Any)[source]

Provides parameter values to a magnitude scoring function.

All required parameters must be populated in order to send to server.

Variables:
  • boosting_range_start (float) – The field value at which boosting starts. Required.

  • boosting_range_end (float) – The field value at which boosting ends. Required.

  • should_boost_beyond_range_by_constant (bool) – A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.

Keyword Arguments:
  • boosting_range_start (float) – The field value at which boosting starts. Required.

  • boosting_range_end (float) – The field value at which boosting ends. Required.

  • should_boost_beyond_range_by_constant (bool) – A value indicating whether to apply a constant boost for field values beyond the range end value; default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MappingCharFilter(*, name: str, mappings: List[str], **kwargs: Any)[source]

A character filter that applies mappings defined with the mappings option. Matching is greedy (longest pattern matching at a given point wins). Replacement is allowed to be the empty string. This character filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of char filter. Required.

  • name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • mappings (list[str]) – A list of mappings of the following format: “a=>b” (all occurrences of the character “a” will be replaced with character “b”). Required.

Keyword Arguments:
  • name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • mappings (list[str]) – A list of mappings of the following format: “a=>b” (all occurrences of the character “a” will be replaced with character “b”). Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MergeSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, insert_pre_tag: str = ' ', insert_post_tag: str = ' ', **kwargs: Any)[source]

A skill for merging two or more strings into a single unified string, with an optional user-defined delimiter separating each component part.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • insert_pre_tag (str) – The tag indicates the start of the merged text. By default, the tag is an empty space.

  • insert_post_tag (str) – The tag indicates the end of the merged text. By default, the tag is an empty space.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • insert_pre_tag (str) – The tag indicates the start of the merged text. By default, the tag is an empty space.

  • insert_post_tag (str) – The tag indicates the end of the merged text. By default, the tag is an empty space.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MicrosoftLanguageStemmingTokenizer(*, name: str, max_token_length: int = 255, is_search_tokenizer: bool = False, language: str | _models.MicrosoftStemmingTokenizerLanguage | None = None, **kwargs: Any)[source]

Divides text using language-specific rules and reduces words to their base forms.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.

  • is_search_tokenizer (bool) – A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.

  • language (str or MicrosoftStemmingTokenizerLanguage) – The language to use. The default is English. Known values are: “arabic”, “bangla”, “bulgarian”, “catalan”, “croatian”, “czech”, “danish”, “dutch”, “english”, “estonian”, “finnish”, “french”, “german”, “greek”, “gujarati”, “hebrew”, “hindi”, “hungarian”, “icelandic”, “indonesian”, “italian”, “kannada”, “latvian”, “lithuanian”, “malay”, “malayalam”, “marathi”, “norwegianBokmaal”, “polish”, “portuguese”, “portugueseBrazilian”, “punjabi”, “romanian”, “russian”, “serbianCyrillic”, “serbianLatin”, “slovak”, “slovenian”, “spanish”, “swedish”, “tamil”, “telugu”, “turkish”, “ukrainian”, and “urdu”.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.

  • is_search_tokenizer (bool) – A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.

  • language (str or MicrosoftStemmingTokenizerLanguage) – The language to use. The default is English. Known values are: “arabic”, “bangla”, “bulgarian”, “catalan”, “croatian”, “czech”, “danish”, “dutch”, “english”, “estonian”, “finnish”, “french”, “german”, “greek”, “gujarati”, “hebrew”, “hindi”, “hungarian”, “icelandic”, “indonesian”, “italian”, “kannada”, “latvian”, “lithuanian”, “malay”, “malayalam”, “marathi”, “norwegianBokmaal”, “polish”, “portuguese”, “portugueseBrazilian”, “punjabi”, “romanian”, “russian”, “serbianCyrillic”, “serbianLatin”, “slovak”, “slovenian”, “spanish”, “swedish”, “tamil”, “telugu”, “turkish”, “ukrainian”, and “urdu”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MicrosoftLanguageTokenizer(*, name: str, max_token_length: int = 255, is_search_tokenizer: bool = False, language: str | _models.MicrosoftTokenizerLanguage | None = None, **kwargs: Any)[source]

Divides text using language-specific rules.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.

  • is_search_tokenizer (bool) – A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.

  • language (str or MicrosoftTokenizerLanguage) – The language to use. The default is English. Known values are: “bangla”, “bulgarian”, “catalan”, “chineseSimplified”, “chineseTraditional”, “croatian”, “czech”, “danish”, “dutch”, “english”, “french”, “german”, “greek”, “gujarati”, “hindi”, “icelandic”, “indonesian”, “italian”, “japanese”, “kannada”, “korean”, “malay”, “malayalam”, “marathi”, “norwegianBokmaal”, “polish”, “portuguese”, “portugueseBrazilian”, “punjabi”, “romanian”, “russian”, “serbianCyrillic”, “serbianLatin”, “slovenian”, “spanish”, “swedish”, “tamil”, “telugu”, “thai”, “ukrainian”, “urdu”, and “vietnamese”.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255.

  • is_search_tokenizer (bool) – A value indicating how the tokenizer is used. Set to true if used as the search tokenizer, set to false if used as the indexing tokenizer. Default is false.

  • language (str or MicrosoftTokenizerLanguage) – The language to use. The default is English. Known values are: “bangla”, “bulgarian”, “catalan”, “chineseSimplified”, “chineseTraditional”, “croatian”, “czech”, “danish”, “dutch”, “english”, “french”, “german”, “greek”, “gujarati”, “hindi”, “icelandic”, “indonesian”, “italian”, “japanese”, “kannada”, “korean”, “malay”, “malayalam”, “marathi”, “norwegianBokmaal”, “polish”, “portuguese”, “portugueseBrazilian”, “punjabi”, “romanian”, “russian”, “serbianCyrillic”, “serbianLatin”, “slovenian”, “spanish”, “swedish”, “tamil”, “telugu”, “thai”, “ukrainian”, “urdu”, and “vietnamese”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Lists the languages supported by the Microsoft language stemming tokenizer.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ARABIC = 'arabic'

Selects the Microsoft stemming tokenizer for Arabic.

BANGLA = 'bangla'

Selects the Microsoft stemming tokenizer for Bangla.

BULGARIAN = 'bulgarian'

Selects the Microsoft stemming tokenizer for Bulgarian.

CATALAN = 'catalan'

Selects the Microsoft stemming tokenizer for Catalan.

CROATIAN = 'croatian'

Selects the Microsoft stemming tokenizer for Croatian.

CZECH = 'czech'

Selects the Microsoft stemming tokenizer for Czech.

DANISH = 'danish'

Selects the Microsoft stemming tokenizer for Danish.

DUTCH = 'dutch'

Selects the Microsoft stemming tokenizer for Dutch.

ENGLISH = 'english'

Selects the Microsoft stemming tokenizer for English.

ESTONIAN = 'estonian'

Selects the Microsoft stemming tokenizer for Estonian.

FINNISH = 'finnish'

Selects the Microsoft stemming tokenizer for Finnish.

FRENCH = 'french'

Selects the Microsoft stemming tokenizer for French.

GERMAN = 'german'

Selects the Microsoft stemming tokenizer for German.

GREEK = 'greek'

Selects the Microsoft stemming tokenizer for Greek.

GUJARATI = 'gujarati'

Selects the Microsoft stemming tokenizer for Gujarati.

HEBREW = 'hebrew'

Selects the Microsoft stemming tokenizer for Hebrew.

HINDI = 'hindi'

Selects the Microsoft stemming tokenizer for Hindi.

HUNGARIAN = 'hungarian'

Selects the Microsoft stemming tokenizer for Hungarian.

ICELANDIC = 'icelandic'

Selects the Microsoft stemming tokenizer for Icelandic.

INDONESIAN = 'indonesian'

Selects the Microsoft stemming tokenizer for Indonesian.

ITALIAN = 'italian'

Selects the Microsoft stemming tokenizer for Italian.

KANNADA = 'kannada'

Selects the Microsoft stemming tokenizer for Kannada.

LATVIAN = 'latvian'

Selects the Microsoft stemming tokenizer for Latvian.

LITHUANIAN = 'lithuanian'

Selects the Microsoft stemming tokenizer for Lithuanian.

MALAY = 'malay'

Selects the Microsoft stemming tokenizer for Malay.

MALAYALAM = 'malayalam'

Selects the Microsoft stemming tokenizer for Malayalam.

MARATHI = 'marathi'

Selects the Microsoft stemming tokenizer for Marathi.

NORWEGIAN_BOKMAAL = 'norwegianBokmaal'

Selects the Microsoft stemming tokenizer for Norwegian (Bokmål).

POLISH = 'polish'

Selects the Microsoft stemming tokenizer for Polish.

PORTUGUESE = 'portuguese'

Selects the Microsoft stemming tokenizer for Portuguese.

PORTUGUESE_BRAZILIAN = 'portugueseBrazilian'

Selects the Microsoft stemming tokenizer for Portuguese (Brazil).

PUNJABI = 'punjabi'

Selects the Microsoft stemming tokenizer for Punjabi.

ROMANIAN = 'romanian'

Selects the Microsoft stemming tokenizer for Romanian.

RUSSIAN = 'russian'

Selects the Microsoft stemming tokenizer for Russian.

SERBIAN_CYRILLIC = 'serbianCyrillic'

Selects the Microsoft stemming tokenizer for Serbian (Cyrillic).

SERBIAN_LATIN = 'serbianLatin'

Selects the Microsoft stemming tokenizer for Serbian (Latin).

SLOVAK = 'slovak'

Selects the Microsoft stemming tokenizer for Slovak.

SLOVENIAN = 'slovenian'

Selects the Microsoft stemming tokenizer for Slovenian.

SPANISH = 'spanish'

Selects the Microsoft stemming tokenizer for Spanish.

SWEDISH = 'swedish'

Selects the Microsoft stemming tokenizer for Swedish.

TAMIL = 'tamil'

Selects the Microsoft stemming tokenizer for Tamil.

TELUGU = 'telugu'

Selects the Microsoft stemming tokenizer for Telugu.

TURKISH = 'turkish'

Selects the Microsoft stemming tokenizer for Turkish.

UKRAINIAN = 'ukrainian'

Selects the Microsoft stemming tokenizer for Ukrainian.

URDU = 'urdu'

Selects the Microsoft stemming tokenizer for Urdu.

class azure.search.documents.indexes.models.MicrosoftTokenizerLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Lists the languages supported by the Microsoft language tokenizer.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

BANGLA = 'bangla'

Selects the Microsoft tokenizer for Bangla.

BULGARIAN = 'bulgarian'

Selects the Microsoft tokenizer for Bulgarian.

CATALAN = 'catalan'

Selects the Microsoft tokenizer for Catalan.

CHINESE_SIMPLIFIED = 'chineseSimplified'

Selects the Microsoft tokenizer for Chinese (Simplified).

CHINESE_TRADITIONAL = 'chineseTraditional'

Selects the Microsoft tokenizer for Chinese (Traditional).

CROATIAN = 'croatian'

Selects the Microsoft tokenizer for Croatian.

CZECH = 'czech'

Selects the Microsoft tokenizer for Czech.

DANISH = 'danish'

Selects the Microsoft tokenizer for Danish.

DUTCH = 'dutch'

Selects the Microsoft tokenizer for Dutch.

ENGLISH = 'english'

Selects the Microsoft tokenizer for English.

FRENCH = 'french'

Selects the Microsoft tokenizer for French.

GERMAN = 'german'

Selects the Microsoft tokenizer for German.

GREEK = 'greek'

Selects the Microsoft tokenizer for Greek.

GUJARATI = 'gujarati'

Selects the Microsoft tokenizer for Gujarati.

HINDI = 'hindi'

Selects the Microsoft tokenizer for Hindi.

ICELANDIC = 'icelandic'

Selects the Microsoft tokenizer for Icelandic.

INDONESIAN = 'indonesian'

Selects the Microsoft tokenizer for Indonesian.

ITALIAN = 'italian'

Selects the Microsoft tokenizer for Italian.

JAPANESE = 'japanese'

Selects the Microsoft tokenizer for Japanese.

KANNADA = 'kannada'

Selects the Microsoft tokenizer for Kannada.

KOREAN = 'korean'

Selects the Microsoft tokenizer for Korean.

MALAY = 'malay'

Selects the Microsoft tokenizer for Malay.

MALAYALAM = 'malayalam'

Selects the Microsoft tokenizer for Malayalam.

MARATHI = 'marathi'

Selects the Microsoft tokenizer for Marathi.

NORWEGIAN_BOKMAAL = 'norwegianBokmaal'

Selects the Microsoft tokenizer for Norwegian (Bokmål).

POLISH = 'polish'

Selects the Microsoft tokenizer for Polish.

PORTUGUESE = 'portuguese'

Selects the Microsoft tokenizer for Portuguese.

PORTUGUESE_BRAZILIAN = 'portugueseBrazilian'

Selects the Microsoft tokenizer for Portuguese (Brazil).

PUNJABI = 'punjabi'

Selects the Microsoft tokenizer for Punjabi.

ROMANIAN = 'romanian'

Selects the Microsoft tokenizer for Romanian.

RUSSIAN = 'russian'

Selects the Microsoft tokenizer for Russian.

SERBIAN_CYRILLIC = 'serbianCyrillic'

Selects the Microsoft tokenizer for Serbian (Cyrillic).

SERBIAN_LATIN = 'serbianLatin'

Selects the Microsoft tokenizer for Serbian (Latin).

SLOVENIAN = 'slovenian'

Selects the Microsoft tokenizer for Slovenian.

SPANISH = 'spanish'

Selects the Microsoft tokenizer for Spanish.

SWEDISH = 'swedish'

Selects the Microsoft tokenizer for Swedish.

TAMIL = 'tamil'

Selects the Microsoft tokenizer for Tamil.

TELUGU = 'telugu'

Selects the Microsoft tokenizer for Telugu.

THAI = 'thai'

Selects the Microsoft tokenizer for Thai.

UKRAINIAN = 'ukrainian'

Selects the Microsoft tokenizer for Ukrainian.

URDU = 'urdu'

Selects the Microsoft tokenizer for Urdu.

VIETNAMESE = 'vietnamese'

Selects the Microsoft tokenizer for Vietnamese.

class azure.search.documents.indexes.models.NGramTokenFilter(*, name: str, min_gram: int = 1, max_gram: int = 2, **kwargs: Any)[source]

Generates n-grams of the given size(s). This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.NGramTokenizer(*, name: str, min_gram: int = 1, max_gram: int = 2, token_chars: List[str | _models.TokenCharacterKind] | None = None, **kwargs: Any)[source]

Tokenizes the input into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2. Maximum is 300.

  • token_chars (list[str or TokenCharacterKind]) – Character classes to keep in the tokens.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • min_gram (int) – The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram.

  • max_gram (int) – The maximum n-gram length. Default is 2. Maximum is 300.

  • token_chars (list[str or TokenCharacterKind]) – Character classes to keep in the tokens.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.OcrLineEnding(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is “space”.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CARRIAGE_RETURN = 'carriageReturn'

Lines are separated by a carriage return (’r’) character.

CARRIAGE_RETURN_LINE_FEED = 'carriageReturnLineFeed'

Lines are separated by a carriage return and a line feed (’rn’) character.

LINE_FEED = 'lineFeed'

Lines are separated by a single line feed (’n’) character.

SPACE = 'space'

Lines are separated by a single space character.

class azure.search.documents.indexes.models.OcrSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | _models.OcrSkillLanguage | None = None, should_detect_orientation: bool = False, line_ending: str | _models.OcrLineEnding | None = None, **kwargs: Any)[source]

A skill that extracts text from image files.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or OcrSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “af”, “sq”, “anp”, “ar”, “ast”, “awa”, “az”, “bfy”, “eu”, “be”, “be-cyrl”, “be-latn”, “bho”, “bi”, “brx”, “bs”, “bra”, “br”, “bg”, “bns”, “bua”, “ca”, “ceb”, “rab”, “ch”, “hne”, “zh-Hans”, “zh-Hant”, “kw”, “co”, “crh”, “hr”, “cs”, “da”, “prs”, “dhi”, “doi”, “nl”, “en”, “myv”, “et”, “fo”, “fj”, “fil”, “fi”, “fr”, “fur”, “gag”, “gl”, “de”, “gil”, “gon”, “el”, “kl”, “gvr”, “ht”, “hlb”, “hni”, “bgc”, “haw”, “hi”, “mww”, “hoc”, “hu”, “is”, “smn”, “id”, “ia”, “iu”, “ga”, “it”, “ja”, “Jns”, “jv”, “kea”, “kac”, “xnr”, “krc”, “kaa-cyrl”, “kaa”, “csb”, “kk-cyrl”, “kk-latn”, “klr”, “kha”, “quc”, “ko”, “kfq”, “kpy”, “kos”, “kum”, “ku-arab”, “ku-latn”, “kru”, “ky”, “lkt”, “la”, “lt”, “dsb”, “smj”, “lb”, “bfz”, “ms”, “mt”, “kmj”, “gv”, “mi”, “mr”, “mn”, “cnr-cyrl”, “cnr-latn”, “nap”, “ne”, “niu”, “nog”, “sme”, “nb”, “no”, “oc”, “os”, “ps”, “fa”, “pl”, “pt”, “pa”, “ksh”, “ro”, “rm”, “ru”, “sck”, “sm”, “sa”, “sat”, “sco”, “gd”, “sr”, “sr-Cyrl”, “sr-Latn”, “xsr”, “srx”, “sms”, “sk”, “sl”, “so”, “sma”, “es”, “sw”, “sv”, “tg”, “tt”, “tet”, “thf”, “to”, “tr”, “tk”, “tyv”, “hsb”, “ur”, “ug”, “uz-arab”, “uz-cyrl”, “uz”, “vo”, “wae”, “cy”, “fy”, “yua”, “za”, “zu”, “unk”, and “is”.

  • should_detect_orientation (bool) – A value indicating to turn orientation detection on or not. Default is false.

  • line_ending (str or OcrLineEnding) – Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is “space”. Known values are: “space”, “carriageReturn”, “lineFeed”, and “carriageReturnLineFeed”.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or OcrSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “af”, “sq”, “anp”, “ar”, “ast”, “awa”, “az”, “bfy”, “eu”, “be”, “be-cyrl”, “be-latn”, “bho”, “bi”, “brx”, “bs”, “bra”, “br”, “bg”, “bns”, “bua”, “ca”, “ceb”, “rab”, “ch”, “hne”, “zh-Hans”, “zh-Hant”, “kw”, “co”, “crh”, “hr”, “cs”, “da”, “prs”, “dhi”, “doi”, “nl”, “en”, “myv”, “et”, “fo”, “fj”, “fil”, “fi”, “fr”, “fur”, “gag”, “gl”, “de”, “gil”, “gon”, “el”, “kl”, “gvr”, “ht”, “hlb”, “hni”, “bgc”, “haw”, “hi”, “mww”, “hoc”, “hu”, “is”, “smn”, “id”, “ia”, “iu”, “ga”, “it”, “ja”, “Jns”, “jv”, “kea”, “kac”, “xnr”, “krc”, “kaa-cyrl”, “kaa”, “csb”, “kk-cyrl”, “kk-latn”, “klr”, “kha”, “quc”, “ko”, “kfq”, “kpy”, “kos”, “kum”, “ku-arab”, “ku-latn”, “kru”, “ky”, “lkt”, “la”, “lt”, “dsb”, “smj”, “lb”, “bfz”, “ms”, “mt”, “kmj”, “gv”, “mi”, “mr”, “mn”, “cnr-cyrl”, “cnr-latn”, “nap”, “ne”, “niu”, “nog”, “sme”, “nb”, “no”, “oc”, “os”, “ps”, “fa”, “pl”, “pt”, “pa”, “ksh”, “ro”, “rm”, “ru”, “sck”, “sm”, “sa”, “sat”, “sco”, “gd”, “sr”, “sr-Cyrl”, “sr-Latn”, “xsr”, “srx”, “sms”, “sk”, “sl”, “so”, “sma”, “es”, “sw”, “sv”, “tg”, “tt”, “tet”, “thf”, “to”, “tr”, “tk”, “tyv”, “hsb”, “ur”, “ug”, “uz-arab”, “uz-cyrl”, “uz”, “vo”, “wae”, “cy”, “fy”, “yua”, “za”, “zu”, “unk”, and “is”.

  • should_detect_orientation (bool) – A value indicating to turn orientation detection on or not. Default is false.

  • line_ending (str or OcrLineEnding) – Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is “space”. Known values are: “space”, “carriageReturn”, “lineFeed”, and “carriageReturnLineFeed”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.OcrSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input by OcrSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AF = 'af'

Afrikaans

ANP = 'anp'

Angika (Devanagiri)

AR = 'ar'

Arabic

AST = 'ast'

Asturian

AWA = 'awa'

Awadhi-Hindi (Devanagiri)

AZ = 'az'

Azerbaijani (Latin)

BE = 'be'

Belarusian (Cyrillic and Latin)

BE_CYRL = 'be-cyrl'

Belarusian (Cyrillic)

BE_LATN = 'be-latn'

Belarusian (Latin)

BFY = 'bfy'

Bagheli

BFZ = 'bfz'

Mahasu Pahari (Devanagiri)

BG = 'bg'

Bulgarian

BGC = 'bgc'

Haryanvi

BHO = 'bho'

Bhojpuri-Hindi (Devanagiri)

BI = 'bi'

Bislama

BNS = 'bns'

Bundeli

BR = 'br'

Breton

BRA = 'bra'

Brajbha

BRX = 'brx'

Bodo (Devanagiri)

BS = 'bs'

Bosnian Latin

BUA = 'bua'

Buryat (Cyrillic)

CA = 'ca'

Catalan

CEB = 'ceb'

Cebuano

CH = 'ch'

Chamorro

CNR_CYRL = 'cnr-cyrl'

Montenegrin (Cyrillic)

CNR_LATN = 'cnr-latn'

Montenegrin (Latin)

CO = 'co'

Corsican

CRH = 'crh'

Crimean Tatar (Latin)

CS = 'cs'

Czech

CSB = 'csb'

Kashubian

CY = 'cy'

Welsh

DA = 'da'

Danish

DE = 'de'

German

DHI = 'dhi'

Dhimal (Devanagiri)

DOI = 'doi'

Dogri (Devanagiri)

DSB = 'dsb'

Lower Sorbian

EL = 'el'

Greek

EN = 'en'

English

ES = 'es'

Spanish

ET = 'et'

Estonian

EU = 'eu'

Basque

FA = 'fa'

Persian

FI = 'fi'

Finnish

FIL = 'fil'

Filipino

FJ = 'fj'

Fijian

FO = 'fo'

Faroese

FR = 'fr'

French

FUR = 'fur'

Frulian

FY = 'fy'

Western Frisian

GA = 'ga'

Irish

GAG = 'gag'

Gagauz (Latin)

GD = 'gd'

Scottish Gaelic

GIL = 'gil'

Gilbertese

GL = 'gl'

Galician

GON = 'gon'

Gondi (Devanagiri)

GV = 'gv'

Manx

GVR = 'gvr'

Gurung (Devanagiri)

HAW = 'haw'

Hawaiian

HI = 'hi'

Hindi

HLB = 'hlb'

Halbi (Devanagiri)

HNE = 'hne'

Chhattisgarhi (Devanagiri)

HNI = 'hni'

Hani

HOC = 'hoc'

Ho (Devanagiri)

HR = 'hr'

Croatian

HSB = 'hsb'

Upper Sorbian

HT = 'ht'

Haitian Creole

HU = 'hu'

Hungarian

IA = 'ia'

Interlingua

ID = 'id'

Indonesian

IS = 'is'

Icelandic

IS_ENUM = 'is'

Icelandic

IT = 'it'

Italian

IU = 'iu'

Inuktitut (Latin)

JA = 'ja'

Japanese

JNS = 'Jns'

Jaunsari (Devanagiri)

JV = 'jv'

Javanese

KAA = 'kaa'

Kara-Kalpak (Latin)

KAA_CYRL = 'kaa-cyrl'

Kara-Kalpak (Cyrillic)

KAC = 'kac'

Kachin (Latin)

KEA = 'kea'

Kabuverdianu

KFQ = 'kfq'

Korku

KHA = 'kha'

Khasi

KK_CYRL = 'kk-cyrl'

Kazakh (Cyrillic)

KK_LATN = 'kk-latn'

Kazakh (Latin)

KL = 'kl'

Greenlandic

KLR = 'klr'

Khaling

KMJ = 'kmj'

Malto (Devanagiri)

KO = 'ko'

Korean

KOS = 'kos'

Kosraean

KPY = 'kpy'

Koryak

KRC = 'krc'

Karachay-Balkar

KRU = 'kru'

Kurukh (Devanagiri)

KSH = 'ksh'

Ripuarian

KUM = 'kum'

Kumyk (Cyrillic)

KU_ARAB = 'ku-arab'

Kurdish (Arabic)

KU_LATN = 'ku-latn'

Kurdish (Latin)

KW = 'kw'

Cornish

KY = 'ky'

Kyrgyz (Cyrillic)

LA = 'la'

Latin

LB = 'lb'

Luxembourgish

LKT = 'lkt'

Lakota

LT = 'lt'

Lithuanian

MI = 'mi'

Maori

MN = 'mn'

Mongolian (Cyrillic)

MR = 'mr'

Marathi

MS = 'ms'

Malay (Latin)

MT = 'mt'

Maltese

MWW = 'mww'

Hmong Daw (Latin)

MYV = 'myv'

Erzya (Cyrillic)

NAP = 'nap'

Neapolitan

NB = 'nb'

Norwegian

NE = 'ne'

Nepali

NIU = 'niu'

Niuean

NL = 'nl'

Dutch

NO = 'no'

Norwegian

NOG = 'nog'

Nogay

OC = 'oc'

Occitan

OS = 'os'

Ossetic

PA = 'pa'

Punjabi (Arabic)

PL = 'pl'

Polish

PRS = 'prs'

Dari

PS = 'ps'

Pashto

PT = 'pt'

Portuguese

QUC = 'quc'

K’iche’

RAB = 'rab'

Chamling

RM = 'rm'

Romansh

RO = 'ro'

Romanian

RU = 'ru'

Russian

SA = 'sa'

Sanskrit (Devanagiri)

SAT = 'sat'

Santali (Devanagiri)

SCK = 'sck'

Sadri (Devanagiri)

SCO = 'sco'

Scots

SK = 'sk'

Slovak

SL = 'sl'

Slovenian

SM = 'sm'

Samoan (Latin)

SMA = 'sma'

Southern Sami

SME = 'sme'

Northern Sami (Latin)

SMJ = 'smj'

Lule Sami

SMN = 'smn'

Inari Sami

SMS = 'sms'

Skolt Sami

SO = 'so'

Somali (Arabic)

SQ = 'sq'

Albanian

SR = 'sr'

Serbian (Latin)

SRX = 'srx'

Sirmauri (Devanagiri)

SR_CYRL = 'sr-Cyrl'

Serbian (Cyrillic)

SR_LATN = 'sr-Latn'

Serbian (Latin)

SV = 'sv'

Swedish

SW = 'sw'

Swahili (Latin)

TET = 'tet'

Tetum

TG = 'tg'

Tajik (Cyrillic)

THF = 'thf'

Thangmi

TK = 'tk'

Turkmen (Latin)

TO = 'to'

Tongan

TR = 'tr'

Turkish

TT = 'tt'

Tatar (Latin)

TYV = 'tyv'

Tuvan

UG = 'ug'

Uyghur (Arabic)

UNK = 'unk'

Unknown (All)

UR = 'ur'

Urdu

UZ = 'uz'

Uzbek (Latin)

UZ_ARAB = 'uz-arab'

Uzbek (Arabic)

UZ_CYRL = 'uz-cyrl'

Uzbek (Cyrillic)

VO = 'vo'

Volapük

WAE = 'wae'

Walser

XNR = 'xnr'

Kangri (Devanagiri)

XSR = 'xsr'

Sherpa (Devanagiri)

YUA = 'yua'

Yucatec Maya

ZA = 'za'

Zhuang

ZH_HANS = 'zh-Hans'

Chinese Simplified

ZH_HANT = 'zh-Hant'

Chinese Traditional

ZU = 'zu'

Zulu

class azure.search.documents.indexes.models.OutputFieldMappingEntry(*, name: str, target_name: str | None = None, **kwargs: Any)[source]

Output field mapping for a skill.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the output defined by the skill. Required.

  • target_name (str) – The target name of the output. It is optional and default to name.

Keyword Arguments:
  • name (str) – The name of the output defined by the skill. Required.

  • target_name (str) – The target name of the output. It is optional and default to name.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PIIDetectionSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | None = None, minimum_precision: float | None = None, masking_mode: str | _models.PIIDetectionSkillMaskingMode | None = None, mask: str | None = None, model_version: str | None = None, pii_categories: List[str] | None = None, domain: str | None = None, **kwargs: Any)[source]

Using the Text Analytics API, extracts personal information from an input text and gives you the option of masking it.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str) – A value indicating which language code to use. Default is en.

  • minimum_precision (float) – A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included.

  • masking_mode (str or PIIDetectionSkillMaskingMode) – A parameter that provides various ways to mask the personal information detected in the input text. Default is ‘none’. Known values are: “none” and “replace”.

  • mask (str) – The character used to mask the text if the maskingMode parameter is set to replace. Default is ‘*’.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

  • pii_categories (list[str]) – A list of PII entity categories that should be extracted and masked.

  • domain (str) – If specified, will set the PII domain to include only a subset of the entity categories. Possible values include: ‘phi’, ‘none’. Default is ‘none’.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str) – A value indicating which language code to use. Default is en.

  • minimum_precision (float) – A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included.

  • masking_mode (str or PIIDetectionSkillMaskingMode) – A parameter that provides various ways to mask the personal information detected in the input text. Default is ‘none’. Known values are: “none” and “replace”.

  • mask (str) – The character used to mask the text if the maskingMode parameter is set to replace. Default is ‘*’.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

  • pii_categories (list[str]) – A list of PII entity categories that should be extracted and masked.

  • domain (str) – If specified, will set the PII domain to include only a subset of the entity categories. Possible values include: ‘phi’, ‘none’. Default is ‘none’.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A string indicating what maskingMode to use to mask the personal information detected in the input text.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

NONE = 'none'

No masking occurs and the maskedText output will not be returned.

REPLACE = 'replace'

Replaces the detected entities with the character given in the maskingCharacter parameter. The character will be repeated to the length of the detected entity so that the offsets will correctly correspond to both the input text as well as the output maskedText.

class azure.search.documents.indexes.models.PathHierarchyTokenizer(*, name: str, delimiter: str = '/', replacement: str = '/', max_token_length: int = 300, reverse_token_order: bool = False, number_of_tokens_to_skip: int = 0, **kwargs: Any)[source]
Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • delimiter (str) – The delimiter character to use. Default is “/”.

  • replacement (str) – A value that, if set, replaces the delimiter character. Default is “/”.

  • max_token_length (int) – The maximum token length. Default and maximum is 300.

  • reverse_token_order (bool) – A value indicating whether to generate tokens in reverse order. Default is false.

  • number_of_tokens_to_skip (int) – The number of initial tokens to skip. Default is 0.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PatternAnalyzer(**kwargs)[source]

Flexibly separates text into terms via a regular expression. This analyzer is implemented using Apache Lucene.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

  • lower_case_terms (bool) – A value indicating whether terms should be lower-cased. Default is true.

  • pattern (str) – A regular expression to match token separators. Default is an expression that matches one or more white space characters.

  • flags (list[str] or list[RegexFlags]) – List of regular expression flags. Possible values of each flag include: ‘CANON_EQ’, ‘CASE_INSENSITIVE’, ‘COMMENTS’, ‘DOTALL’, ‘LITERAL’, ‘MULTILINE’, ‘UNICODE_CASE’, ‘UNIX_LINES’.

  • stopwords (list[str]) – A list of stopwords.

Keyword Arguments:

name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PatternCaptureTokenFilter(*, name: str, patterns: List[str], preserve_original: bool = True, **kwargs: Any)[source]

Uses Java regexes to emit multiple tokens - one for each capture group in one or more patterns. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • patterns (list[str]) – A list of patterns to match against each token. Required.

  • preserve_original (bool) – A value indicating whether to return the original token even if one of the patterns matches. Default is true.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • patterns (list[str]) – A list of patterns to match against each token. Required.

  • preserve_original (bool) – A value indicating whether to return the original token even if one of the patterns matches. Default is true.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PatternReplaceCharFilter(*, name: str, pattern: str, replacement: str, **kwargs: Any)[source]

A character filter that replaces characters in the input string. It uses a regular expression to identify character sequences to preserve and a replacement pattern to identify characters to replace. For example, given the input text “aa bb aa bb”, pattern “(aa)s+(bb)”, and replacement “$1#$2”, the result would be “aa#bb aa#bb”. This character filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of char filter. Required.

  • name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • pattern (str) – A regular expression pattern. Required.

  • replacement (str) – The replacement text. Required.

Keyword Arguments:
  • name (str) – The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • pattern (str) – A regular expression pattern. Required.

  • replacement (str) – The replacement text. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PatternReplaceTokenFilter(*, name: str, pattern: str, replacement: str, **kwargs: Any)[source]

A character filter that replaces characters in the input string. It uses a regular expression to identify character sequences to preserve and a replacement pattern to identify characters to replace. For example, given the input text “aa bb aa bb”, pattern “(aa)s+(bb)”, and replacement “$1#$2”, the result would be “aa#bb aa#bb”. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • pattern (str) – A regular expression pattern. Required.

  • replacement (str) – The replacement text. Required.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • pattern (str) – A regular expression pattern. Required.

  • replacement (str) – The replacement text. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PatternTokenizer(**kwargs)[source]

Tokenizer that uses regex pattern matching to construct distinct tokens. This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

  • pattern (str) – A regular expression to match token separators. Default is an expression that matches one or more white space characters.

  • flags (list[str] or list[RegexFlags]) – List of regular expression flags. Possible values of each flag include: ‘CANON_EQ’, ‘CASE_INSENSITIVE’, ‘COMMENTS’, ‘DOTALL’, ‘LITERAL’, ‘MULTILINE’, ‘UNICODE_CASE’, ‘UNIX_LINES’.

  • group (int) – The zero-based ordinal of the matching group in the regular expression to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1.

Keyword Arguments:

name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.PhoneticEncoder(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Identifies the type of phonetic encoder to use with a PhoneticTokenFilter.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

BEIDER_MORSE = 'beiderMorse'

Encodes a token into a Beider-Morse value.

CAVERPHONE1 = 'caverphone1'

Encodes a token into a Caverphone 1.0 value.

CAVERPHONE2 = 'caverphone2'

Encodes a token into a Caverphone 2.0 value.

COLOGNE = 'cologne'

Encodes a token into a Cologne Phonetic value.

DOUBLE_METAPHONE = 'doubleMetaphone'

Encodes a token into a double metaphone value.

HAASE_PHONETIK = 'haasePhonetik'

Encodes a token using the Haase refinement of the Kölner Phonetik algorithm.

KOELNER_PHONETIK = 'koelnerPhonetik'

Encodes a token using the Kölner Phonetik algorithm.

METAPHONE = 'metaphone'

Encodes a token into a Metaphone value.

NYSIIS = 'nysiis'

Encodes a token into a NYSIIS value.

REFINED_SOUNDEX = 'refinedSoundex'

Encodes a token into a Refined Soundex value.

SOUNDEX = 'soundex'

Encodes a token into a Soundex value.

class azure.search.documents.indexes.models.PhoneticTokenFilter(*, name: str, encoder: str | _models.PhoneticEncoder | None = None, replace_original_tokens: bool = True, **kwargs: Any)[source]

Create tokens for phonetic matches. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • encoder (str or PhoneticEncoder) – The phonetic encoder to use. Default is “metaphone”. Known values are: “metaphone”, “doubleMetaphone”, “soundex”, “refinedSoundex”, “caverphone1”, “caverphone2”, “cologne”, “nysiis”, “koelnerPhonetik”, “haasePhonetik”, and “beiderMorse”.

  • replace_original_tokens (bool) – A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • encoder (str or PhoneticEncoder) – The phonetic encoder to use. Default is “metaphone”. Known values are: “metaphone”, “doubleMetaphone”, “soundex”, “refinedSoundex”, “caverphone1”, “caverphone2”, “cologne”, “nysiis”, “koelnerPhonetik”, “haasePhonetik”, and “beiderMorse”.

  • replace_original_tokens (bool) – A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.RegexFlags(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines flags that can be combined to control how regular expressions are used in the pattern analyzer and pattern tokenizer.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CANON_EQ = 'CANON_EQ'

Enables canonical equivalence.

CASE_INSENSITIVE = 'CASE_INSENSITIVE'

Enables case-insensitive matching.

COMMENTS = 'COMMENTS'

Permits whitespace and comments in the pattern.

DOT_ALL = 'DOTALL'

Enables dotall mode.

LITERAL = 'LITERAL'

Enables literal parsing of the pattern.

MULTILINE = 'MULTILINE'

Enables multiline mode.

UNICODE_CASE = 'UNICODE_CASE'

Enables Unicode-aware case folding.

UNIX_LINES = 'UNIX_LINES'

Enables Unix lines mode.

class azure.search.documents.indexes.models.ScalarQuantizationCompression(*, compression_name: str, rerank_with_original_vectors: bool = True, default_oversampling: float | None = None, parameters: _models.ScalarQuantizationParameters | None = None, **kwargs: Any)[source]

Contains configuration options specific to the scalar quantization compression method used during indexing and querying.

All required parameters must be populated in order to send to server.

Variables:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchCompressionKind) – The name of the kind of compression method being configured for use with vector search. Required. Known values are: “scalarQuantization” and “binaryQuantization”.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

  • parameters (ScalarQuantizationParameters) – Contains the parameters specific to Scalar Quantization.

Keyword Arguments:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

  • parameters (ScalarQuantizationParameters) – Contains the parameters specific to Scalar Quantization.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ScalarQuantizationParameters(*, quantized_data_type: str | _models.VectorSearchCompressionTarget | None = None, **kwargs: Any)[source]

Contains the parameters specific to Scalar Quantization.

Variables:

quantized_data_type (str or VectorSearchCompressionTarget) – The quantized data type of compressed vector values. “int8”

Keyword Arguments:

quantized_data_type (str or VectorSearchCompressionTarget) – The quantized data type of compressed vector values. “int8”

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ScoringFunction(*, field_name: str, boost: float, interpolation: str | _models.ScoringFunctionInterpolation | None = None, **kwargs: Any)[source]

Base type for functions that can modify document scores during ranking.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: DistanceScoringFunction, FreshnessScoringFunction, MagnitudeScoringFunction, TagScoringFunction

All required parameters must be populated in order to send to server.

Variables:
  • type (str) – Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. Required.

  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

Keyword Arguments:
  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ScoringFunctionAggregation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the aggregation function used to combine the results of all the scoring functions in a scoring profile.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AVERAGE = 'average'

Boost scores by the average of all scoring function results.

FIRST_MATCHING = 'firstMatching'

Boost scores using the first applicable scoring function in the scoring profile.

MAXIMUM = 'maximum'

Boost scores by the maximum of all scoring function results.

MINIMUM = 'minimum'

Boost scores by the minimum of all scoring function results.

SUM = 'sum'

Boost scores by the sum of all scoring function results.

class azure.search.documents.indexes.models.ScoringFunctionInterpolation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the function used to interpolate score boosting across a range of documents.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

CONSTANT = 'constant'

Boosts scores by a constant factor.

LINEAR = 'linear'

Boosts scores by a linearly decreasing amount. This is the default interpolation for scoring functions.

LOGARITHMIC = 'logarithmic'

Boosts scores by an amount that decreases logarithmically. Boosts decrease quickly for higher scores, and more slowly as the scores decrease. This interpolation option is not allowed in tag scoring functions.

QUADRATIC = 'quadratic'

Boosts scores by an amount that decreases quadratically. Boosts decrease slowly for higher scores, and more quickly as the scores decrease. This interpolation option is not allowed in tag scoring functions.

class azure.search.documents.indexes.models.ScoringProfile(*, name: str, text_weights: _models.TextWeights | None = None, functions: List[_models.ScoringFunction] | None = None, function_aggregation: str | _models.ScoringFunctionAggregation | None = None, **kwargs: Any)[source]

Defines parameters for a search index that influence scoring in search queries.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the scoring profile. Required.

  • text_weights (TextWeights) – Parameters that boost scoring based on text matches in certain index fields.

  • functions (list[ScoringFunction]) – The collection of functions that influence the scoring of documents.

  • function_aggregation (str or ScoringFunctionAggregation) – A value indicating how the results of individual scoring functions should be combined. Defaults to “Sum”. Ignored if there are no scoring functions. Known values are: “sum”, “average”, “minimum”, “maximum”, and “firstMatching”.

Keyword Arguments:
  • name (str) – The name of the scoring profile. Required.

  • text_weights (TextWeights) – Parameters that boost scoring based on text matches in certain index fields.

  • functions (list[ScoringFunction]) – The collection of functions that influence the scoring of documents.

  • function_aggregation (str or ScoringFunctionAggregation) – A value indicating how the results of individual scoring functions should be combined. Defaults to “Sum”. Ignored if there are no scoring functions. Known values are: “sum”, “average”, “minimum”, “maximum”, and “firstMatching”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchField(*, name: str, type: str | SearchFieldDataType, key: bool | None = None, hidden: bool | None = None, stored: bool | None = None, searchable: bool | None = None, filterable: bool | None = None, sortable: bool | None = None, facetable: bool | None = None, analyzer_name: str | LexicalAnalyzerName | None = None, search_analyzer_name: str | LexicalAnalyzerName | None = None, index_analyzer_name: str | LexicalAnalyzerName | None = None, synonym_map_names: List[str] | None = None, fields: List[SearchField] | None = None, vector_search_dimensions: int | None = None, vector_search_profile_name: str | None = None, vector_encoding_format: str | VectorEncodingFormat | None = None, **kwargs)[source]

Represents a field in an index definition, which describes the name, data type, and search behavior of a field.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – The name of the field, which must be unique within the fields collection of the index or parent field. Required.

  • type (str or SearchFieldDataType) – The data type of the field. Required. Known values are: “Edm.String”, “Edm.Int32”, “Edm.Int64”, “Edm.Double”, “Edm.Boolean”, “Edm.DateTimeOffset”, “Edm.GeographyPoint”, “Edm.ComplexType”, “Edm.Single”, “Edm.Half”, “Edm.Int16”, “Edm.SByte”, and “Edm.Byte”.

  • key (bool) – A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false for simple fields and null for complex fields.

  • stored (bool) – An immutable value indicating whether the field will be persisted separately on disk to be returned in a search result. You can disable this option if you don’t plan to return the field contents in a search response to save on storage overhead. This can only be set during index creation and only for vector fields. This property cannot be changed for existing fields or set as false for new fields. If this property is set as false, the property ‘hidden’ must be set to true. This property must be true or unset for key fields, for new fields, and for non-vector fields, and it must be null for complex fields. Disabling this property will reduce index storage requirements. The default is true for vector fields.

  • searchable (bool) – A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like “sunny day”, internally it will be split into the individual tokens “sunny” and “day”. This enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property must be false for simple fields of other non-string data types, and it must be null for complex fields. Note: searchable fields consume extra space in your index since Azure Cognitive Search will store an additional tokenized version of the field value for full-text searches. If you want to save space in your index and you don’t need a field to be included in searches, set searchable to false.

  • filterable (bool) – A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to “sunny day”, $filter=f eq ‘sunny’ will find no matches, but $filter=f eq ‘sunny day’ will. This property must be null for complex fields. Default is true for simple fields and null for complex fields.

  • sortable (bool) – A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it’s an immediate parent field, or an ancestor field, that’s the complex collection. Complex fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields.

  • facetable (bool) – A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields.

  • analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer to use for the field. This option can be used only with searchable fields and it can’t be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Known values are: “ar.microsoft”, “ar.lucene”, “hy.lucene”, “bn.microsoft”, “eu.lucene”, “bg.microsoft”, “bg.lucene”, “ca.microsoft”, “ca.lucene”, “zh-Hans.microsoft”, “zh-Hans.lucene”, “zh-Hant.microsoft”, “zh-Hant.lucene”, “hr.microsoft”, “cs.microsoft”, “cs.lucene”, “da.microsoft”, “da.lucene”, “nl.microsoft”, “nl.lucene”, “en.microsoft”, “en.lucene”, “et.microsoft”, “fi.microsoft”, “fi.lucene”, “fr.microsoft”, “fr.lucene”, “gl.lucene”, “de.microsoft”, “de.lucene”, “el.microsoft”, “el.lucene”, “gu.microsoft”, “he.microsoft”, “hi.microsoft”, “hi.lucene”, “hu.microsoft”, “hu.lucene”, “is.microsoft”, “id.microsoft”, “id.lucene”, “ga.lucene”, “it.microsoft”, “it.lucene”, “ja.microsoft”, “ja.lucene”, “kn.microsoft”, “ko.microsoft”, “ko.lucene”, “lv.microsoft”, “lv.lucene”, “lt.microsoft”, “ml.microsoft”, “ms.microsoft”, “mr.microsoft”, “nb.microsoft”, “no.lucene”, “fa.lucene”, “pl.microsoft”, “pl.lucene”, “pt-BR.microsoft”, “pt-BR.lucene”, “pt-PT.microsoft”, “pt-PT.lucene”, “pa.microsoft”, “ro.microsoft”, “ro.lucene”, “ru.microsoft”, “ru.lucene”, “sr-cyrillic.microsoft”, “sr-latin.microsoft”, “sk.microsoft”, “sl.microsoft”, “es.microsoft”, “es.lucene”, “sv.microsoft”, “sv.lucene”, “ta.microsoft”, “te.microsoft”, “th.microsoft”, “th.lucene”, “tr.microsoft”, “tr.lucene”, “uk.microsoft”, “ur.microsoft”, “vi.microsoft”, “standard.lucene”, “standardasciifolding.lucene”, “keyword”, “pattern”, “simple”, “stop”, and “whitespace”.

  • search_analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields. Known values are: “ar.microsoft”, “ar.lucene”, “hy.lucene”, “bn.microsoft”, “eu.lucene”, “bg.microsoft”, “bg.lucene”, “ca.microsoft”, “ca.lucene”, “zh-Hans.microsoft”, “zh-Hans.lucene”, “zh-Hant.microsoft”, “zh-Hant.lucene”, “hr.microsoft”, “cs.microsoft”, “cs.lucene”, “da.microsoft”, “da.lucene”, “nl.microsoft”, “nl.lucene”, “en.microsoft”, “en.lucene”, “et.microsoft”, “fi.microsoft”, “fi.lucene”, “fr.microsoft”, “fr.lucene”, “gl.lucene”, “de.microsoft”, “de.lucene”, “el.microsoft”, “el.lucene”, “gu.microsoft”, “he.microsoft”, “hi.microsoft”, “hi.lucene”, “hu.microsoft”, “hu.lucene”, “is.microsoft”, “id.microsoft”, “id.lucene”, “ga.lucene”, “it.microsoft”, “it.lucene”, “ja.microsoft”, “ja.lucene”, “kn.microsoft”, “ko.microsoft”, “ko.lucene”, “lv.microsoft”, “lv.lucene”, “lt.microsoft”, “ml.microsoft”, “ms.microsoft”, “mr.microsoft”, “nb.microsoft”, “no.lucene”, “fa.lucene”, “pl.microsoft”, “pl.lucene”, “pt-BR.microsoft”, “pt-BR.lucene”, “pt-PT.microsoft”, “pt-PT.lucene”, “pa.microsoft”, “ro.microsoft”, “ro.lucene”, “ru.microsoft”, “ru.lucene”, “sr-cyrillic.microsoft”, “sr-latin.microsoft”, “sk.microsoft”, “sl.microsoft”, “es.microsoft”, “es.lucene”, “sv.microsoft”, “sv.lucene”, “ta.microsoft”, “te.microsoft”, “th.microsoft”, “th.lucene”, “tr.microsoft”, “tr.lucene”, “uk.microsoft”, “ur.microsoft”, “vi.microsoft”, “standard.lucene”, “standardasciifolding.lucene”, “keyword”, “pattern”, “simple”, “stop”, and “whitespace”.

  • index_analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Known values are: “ar.microsoft”, “ar.lucene”, “hy.lucene”, “bn.microsoft”, “eu.lucene”, “bg.microsoft”, “bg.lucene”, “ca.microsoft”, “ca.lucene”, “zh-Hans.microsoft”, “zh-Hans.lucene”, “zh-Hant.microsoft”, “zh-Hant.lucene”, “hr.microsoft”, “cs.microsoft”, “cs.lucene”, “da.microsoft”, “da.lucene”, “nl.microsoft”, “nl.lucene”, “en.microsoft”, “en.lucene”, “et.microsoft”, “fi.microsoft”, “fi.lucene”, “fr.microsoft”, “fr.lucene”, “gl.lucene”, “de.microsoft”, “de.lucene”, “el.microsoft”, “el.lucene”, “gu.microsoft”, “he.microsoft”, “hi.microsoft”, “hi.lucene”, “hu.microsoft”, “hu.lucene”, “is.microsoft”, “id.microsoft”, “id.lucene”, “ga.lucene”, “it.microsoft”, “it.lucene”, “ja.microsoft”, “ja.lucene”, “kn.microsoft”, “ko.microsoft”, “ko.lucene”, “lv.microsoft”, “lv.lucene”, “lt.microsoft”, “ml.microsoft”, “ms.microsoft”, “mr.microsoft”, “nb.microsoft”, “no.lucene”, “fa.lucene”, “pl.microsoft”, “pl.lucene”, “pt-BR.microsoft”, “pt-BR.lucene”, “pt-PT.microsoft”, “pt-PT.lucene”, “pa.microsoft”, “ro.microsoft”, “ro.lucene”, “ru.microsoft”, “ru.lucene”, “sr-cyrillic.microsoft”, “sr-latin.microsoft”, “sk.microsoft”, “sl.microsoft”, “es.microsoft”, “es.lucene”, “sv.microsoft”, “sv.lucene”, “ta.microsoft”, “te.microsoft”, “th.microsoft”, “th.lucene”, “tr.microsoft”, “tr.lucene”, “uk.microsoft”, “ur.microsoft”, “vi.microsoft”, “standard.lucene”, “standardasciifolding.lucene”, “keyword”, “pattern”, “simple”, “stop”, and “whitespace”.

  • vector_search_dimensions (int) – The dimensionality of the vector field.

  • vector_search_profile_name (str) – The name of the vector search profile that specifies the algorithm to use when searching the vector field.

  • synonym_map_names (list[str]) – A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields.

  • fields (list[SearchField]) – A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields.

  • vector_encoding_format (str or VectorEncodingFormat) – The encoding format to interpret the field contents. “packedBit”

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SearchField instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchField instance

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) SearchField | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchField instance

Return type:

SearchField

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.SearchIndex(*, name: str, fields: List[SearchField], scoring_profiles: List[ScoringProfile] | None = None, default_scoring_profile: str | None = None, cors_options: CorsOptions | None = None, suggesters: List[SearchSuggester] | None = None, analyzers: List[LexicalAnalyzer] | None = None, tokenizers: List[LexicalTokenizer] | None = None, token_filters: List[TokenFilter] | None = None, char_filters: List[CharFilter] | None = None, encryption_key: SearchResourceEncryptionKey | None = None, similarity: SimilarityAlgorithm | None = None, semantic_search: SemanticSearch | None = None, vector_search: VectorSearch | None = None, e_tag: str | None = None, **kwargs)[source]

Represents a search index definition, which describes the fields and search behavior of an index.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – Required. The name of the index.

  • fields (list[SearchField]) – Required. The fields of the index.

  • scoring_profiles (list[ScoringProfile]) – The scoring profiles for the index.

  • default_scoring_profile (str) – The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used.

  • cors_options (CorsOptions) – Options to control Cross-Origin Resource Sharing (CORS) for the index.

  • suggesters (list[SearchSuggester]) – The suggesters for the index.

  • analyzers (list[LexicalAnalyzer]) – The analyzers for the index.

  • tokenizers (list[LexicalTokenizer]) – The tokenizers for the index.

  • token_filters (list[TokenFilter]) – The token filters for the index.

  • char_filters (list[CharFilter]) – The character filters for the index.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

  • similarity (SimilarityAlgorithm) – The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used.

  • semantic_search (SemanticSearch) – Defines parameters for a search index that influence semantic capabilities.

  • vector_search (VectorSearch) – Defines parameters for a search index that influence scoring in a vector space.

  • e_tag (str) – The ETag of the index.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SearchIndex instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndex instance

Return type:

SearchIndex

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndex instance

Return type:

SearchIndex

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.SearchIndexer(*, name: str, data_source_name: str, target_index_name: str, description: str | None = None, skillset_name: str | None = None, schedule: _models.IndexingSchedule | None = None, parameters: _models.IndexingParameters | None = None, field_mappings: List[_models.FieldMapping] | None = None, output_field_mappings: List[_models.FieldMapping] | None = None, is_disabled: bool = False, e_tag: str | None = None, encryption_key: _models.SearchResourceEncryptionKey | None = None, **kwargs: Any)[source]

Represents an indexer.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the indexer. Required.

  • description (str) – The description of the indexer.

  • data_source_name (str) – The name of the datasource from which this indexer reads data. Required.

  • skillset_name (str) – The name of the skillset executing with this indexer.

  • target_index_name (str) – The name of the index to which this indexer writes data. Required.

  • schedule (IndexingSchedule) – The schedule for this indexer.

  • parameters (IndexingParameters) – Parameters for indexer execution.

  • field_mappings (list[FieldMapping]) – Defines mappings between fields in the data source and corresponding target fields in the index.

  • output_field_mappings (list[FieldMapping]) – Output field mappings are applied after enrichment and immediately before indexing.

  • is_disabled (bool) – A value indicating whether the indexer is disabled. Default is false.

  • e_tag (str) – The ETag of the indexer.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

Keyword Arguments:
  • name (str) – The name of the indexer. Required.

  • description (str) – The description of the indexer.

  • data_source_name (str) – The name of the datasource from which this indexer reads data. Required.

  • skillset_name (str) – The name of the skillset executing with this indexer.

  • target_index_name (str) – The name of the index to which this indexer writes data. Required.

  • schedule (IndexingSchedule) – The schedule for this indexer.

  • parameters (IndexingParameters) – Parameters for indexer execution.

  • field_mappings (list[FieldMapping]) – Defines mappings between fields in the data source and corresponding target fields in the index.

  • output_field_mappings (list[FieldMapping]) – Output field mappings are applied after enrichment and immediately before indexing.

  • is_disabled (bool) – A value indicating whether the indexer is disabled. Default is false.

  • e_tag (str) – The ETag of the indexer.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerDataContainer(*, name: str, query: str | None = None, **kwargs: Any)[source]

Represents information about the entity (such as Azure SQL table or CosmosDB collection) that will be indexed.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. Required.

  • query (str) – A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources.

Keyword Arguments:
  • name (str) – The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. Required.

  • query (str) – A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerDataIdentity(**kwargs: Any)[source]

Abstract base type for data identities.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchIndexerDataNoneIdentity, SearchIndexerDataUserAssignedIdentity

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – A URI fragment specifying the type of identity. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerDataNoneIdentity(**kwargs: Any)[source]

Clears the identity property of a datasource.

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – A URI fragment specifying the type of identity. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerDataSourceConnection(*, name: str, description: str | None = None, type: str, connection_string: str, container: SearchIndexerDataContainer, data_change_detection_policy: DataChangeDetectionPolicy | None = None, data_deletion_detection_policy: DataDeletionDetectionPolicy | None = None, e_tag: str | None = None, encryption_key: SearchResourceEncryptionKey | None = None, **kwargs)[source]

Represents a datasource connection definition, which can be used to configure an indexer.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – Required. The name of the datasource connection.

  • description (str) – The description of the datasource connection.

  • type (str or SearchIndexerDataSourceType) – Required. The type of the datasource connection. Possible values include: “azuresql”, “cosmosdb”, “azureblob”, “azuretable”, “mysql”, “adlsgen2”.

  • connection_string (str) – The connection string for the datasource connection.

  • container (SearchIndexerDataContainer) – Required. The data container for the datasource connection.

  • data_change_detection_policy (DataChangeDetectionPolicy) – The data change detection policy for the datasource connection.

  • data_deletion_detection_policy (DataDeletionDetectionPolicy) – The data deletion detection policy for the datasource connection.

  • e_tag (str) – The ETag of the data source.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition in Azure Cognitive Search. Once you have encrypted your data source definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SearchIndexerDataSourceConnection instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndexerDataSourceConnection instance

Return type:

SearchIndexerDataSourceConnection

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndexerDataSourceConnection instance

Return type:

SearchIndexerDataSourceConnection

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.SearchIndexerDataSourceType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the type of a datasource.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ADLS_GEN2 = 'adlsgen2'

Indicates an ADLS Gen2 datasource.

AZURE_BLOB = 'azureblob'

Indicates an Azure Blob datasource.

AZURE_SQL = 'azuresql'

Indicates an Azure SQL datasource.

AZURE_TABLE = 'azuretable'

Indicates an Azure Table datasource.

COSMOS_DB = 'cosmosdb'

Indicates a CosmosDB datasource.

MY_SQL = 'mysql'

Indicates a MySql datasource.

class azure.search.documents.indexes.models.SearchIndexerDataUserAssignedIdentity(*, resource_id: str, **kwargs: Any)[source]

Specifies the identity for a datasource to use.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of identity. Required.

  • resource_id (str) – The fully qualified Azure resource Id of a user assigned managed identity typically in the form “/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId” # pylint: disable=line-too-long that should have been assigned to the search service. Required.

Keyword Arguments:

resource_id (str) – The fully qualified Azure resource Id of a user assigned managed identity typically in the form “/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId” # pylint: disable=line-too-long that should have been assigned to the search service. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerError(**kwargs: Any)[source]

Represents an item- or document-level indexing error.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • key (str) – The key of the item for which indexing failed.

  • error_message (str) – The message describing the error that occurred while processing the item. Required.

  • status_code (int) – The status code indicating why the indexing operation failed. Possible values include: 400 for a malformed input document, 404 for document not found, 409 for a version conflict, 422 when the index is temporarily unavailable, or 503 for when the service is too busy. Required.

  • name (str) – The name of the source at which the error originated. For example, this could refer to a particular skill in the attached skillset. This may not be always available.

  • details (str) – Additional, verbose details about the error to assist in debugging the indexer. This may not be always available.

  • documentation_link (str) – A link to a troubleshooting guide for these classes of errors. This may not be always available.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerIndexProjection(*, selectors: List[_models.SearchIndexerIndexProjectionSelector], parameters: _models.SearchIndexerIndexProjectionsParameters | None = None, **kwargs: Any)[source]

Definition of additional projections to secondary search indexes.

All required parameters must be populated in order to send to server.

Variables:
Keyword Arguments:
as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerIndexProjectionSelector(*, target_index_name: str, parent_key_field_name: str, source_context: str, mappings: List[_models.InputFieldMappingEntry], **kwargs: Any)[source]

Description for what data to store in the designated search index.

All required parameters must be populated in order to send to server.

Variables:
  • target_index_name (str) – Name of the search index to project to. Must have a key field with the ‘keyword’ analyzer set. Required.

  • parent_key_field_name (str) – Name of the field in the search index to map the parent document’s key value to. Must be a string field that is filterable and not the key field. Required.

  • source_context (str) – Source context for the projections. Represents the cardinality at which the document will be split into multiple sub documents. Required.

  • mappings (list[InputFieldMappingEntry]) – Mappings for the projection, or which source should be mapped to which field in the target index. Required.

Keyword Arguments:
  • target_index_name (str) – Name of the search index to project to. Must have a key field with the ‘keyword’ analyzer set. Required.

  • parent_key_field_name (str) – Name of the field in the search index to map the parent document’s key value to. Must be a string field that is filterable and not the key field. Required.

  • source_context (str) – Source context for the projections. Represents the cardinality at which the document will be split into multiple sub documents. Required.

  • mappings (list[InputFieldMappingEntry]) – Mappings for the projection, or which source should be mapped to which field in the target index. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerIndexProjectionsParameters(*, additional_properties: Dict[str, Any] | None = None, projection_mode: str | _models.IndexProjectionMode | None = None, **kwargs: Any)[source]

A dictionary of index projection-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type.

Variables:
  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • projection_mode (str or IndexProjectionMode) – Defines behavior of the index projections in relation to the rest of the indexer. Known values are: “skipIndexingParentDocuments” and “includeIndexingParentDocuments”.

Keyword Arguments:
  • additional_properties (dict[str, any]) – Unmatched properties from the message are deserialized to this collection.

  • projection_mode (str or IndexProjectionMode) – Defines behavior of the index projections in relation to the rest of the indexer. Known values are: “skipIndexingParentDocuments” and “includeIndexingParentDocuments”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStore(*, storage_connection_string: str, projections: List[_models.SearchIndexerKnowledgeStoreProjection], **kwargs: Any)[source]

Definition of additional projections to azure blob, table, or files, of enriched data.

All required parameters must be populated in order to send to server.

Variables:
  • storage_connection_string (str) – The connection string to the storage account projections will be stored in. Required.

  • projections (list[SearchIndexerKnowledgeStoreProjection]) – A list of additional projections to perform during indexing. Required.

Keyword Arguments:
  • storage_connection_string (str) – The connection string to the storage account projections will be stored in. Required.

  • projections (list[SearchIndexerKnowledgeStoreProjection]) – A list of additional projections to perform during indexing. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreBlobProjectionSelector(*, storage_container: str, reference_key_name: str | None = None, generated_key_name: str | None = None, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Abstract class to share properties between concrete selectors.

All required parameters must be populated in order to send to server.

Variables:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

Keyword Arguments:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector(*, storage_container: str, reference_key_name: str | None = None, generated_key_name: str | None = None, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Projection definition for what data to store in Azure Files.

All required parameters must be populated in order to send to server.

Variables:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

Keyword Arguments:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector(*, storage_container: str, reference_key_name: str | None = None, generated_key_name: str | None = None, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Projection definition for what data to store in Azure Blob.

All required parameters must be populated in order to send to server.

Variables:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

Keyword Arguments:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • storage_container (str) – Blob container to store projections in. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection(*, tables: List[_models.SearchIndexerKnowledgeStoreTableProjectionSelector] | None = None, objects: List[_models.SearchIndexerKnowledgeStoreObjectProjectionSelector] | None = None, files: List[_models.SearchIndexerKnowledgeStoreFileProjectionSelector] | None = None, **kwargs: Any)[source]

Container object for various projection selectors.

Variables:
Keyword Arguments:
as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjectionSelector(*, reference_key_name: str | None = None, generated_key_name: str | None = None, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Abstract class to share properties between concrete selectors.

Variables:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

Keyword Arguments:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector(*, table_name: str, reference_key_name: str | None = None, generated_key_name: str | None = None, source: str | None = None, source_context: str | None = None, inputs: List[_models.InputFieldMappingEntry] | None = None, **kwargs: Any)[source]

Description for what data to store in Azure Tables.

All required parameters must be populated in order to send to server.

Variables:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • table_name (str) – Name of the Azure table to store projected data in. Required.

Keyword Arguments:
  • reference_key_name (str) – Name of reference key to different projection.

  • generated_key_name (str) – Name of generated key to store projection under.

  • source (str) – Source data to project.

  • source_context (str) – Source context for complex projections.

  • inputs (list[InputFieldMappingEntry]) – Nested inputs for complex projections.

  • table_name (str) – Name of the Azure table to store projected data in. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerLimits(**kwargs: Any)[source]

SearchIndexerLimits.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
  • max_run_time (timedelta) – The maximum duration that the indexer is permitted to run for one execution.

  • max_document_extraction_size (int) – The maximum size of a document, in bytes, which will be considered valid for indexing.

  • max_document_content_characters_to_extract (int) – The maximum number of characters that will be extracted from a document picked up for indexing.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, **kwargs: Any)[source]

Base type for skills.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: WebApiSkill, AzureOpenAIEmbeddingSkill, CustomEntityLookupSkill, EntityRecognitionSkill, KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, PIIDetectionSkill, SentimentSkill, SplitSkill, TextTranslationSkill, EntityLinkingSkill, EntityRecognitionSkillV3, SentimentSkillV3, ConditionalSkill, DocumentExtractionSkill, ShaperSkill, ImageAnalysisSkill, OcrSkill

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerSkillset(*, name: str, skills: List[SearchIndexerSkill], description: str | None = None, cognitive_services_account: CognitiveServicesAccount | None = None, knowledge_store: SearchIndexerKnowledgeStore | None = None, index_projection: SearchIndexerIndexProjection | None = None, e_tag: str | None = None, encryption_key: SearchResourceEncryptionKey | None = None, **kwargs: Any)[source]

A list of skills.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – The name of the skillset. Required.

  • description (str) – The description of the skillset.

  • skills (list[SearchIndexerSkill]) – A list of skills in the skillset. Required.

  • cognitive_services_account (CognitiveServicesAccount) – Details about the Azure AI service to be used when running skills.

  • knowledge_store (SearchIndexerKnowledgeStore) – Definition of additional projections to Azure blob, table, or files, of enriched data.

  • index_projection (SearchIndexerIndexProjection) – Definition of additional projections to secondary search index(es).

  • e_tag (str) – The ETag of the skillset.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition. Once you have encrypted your skillset definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SearchIndexerSkillset instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndexerSkillset instance

Return type:

SearchIndexerSkillset

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchIndexerSkillset instance

Return type:

SearchIndexerSkillset

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.SearchIndexerStatus(**kwargs: Any)[source]

Represents the current status and execution history of an indexer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • status (str or IndexerStatus) – Overall indexer status. Required. Known values are: “unknown”, “error”, and “running”.

  • last_result (IndexerExecutionResult) – The result of the most recent or an in-progress indexer execution.

  • execution_history (list[IndexerExecutionResult]) – History of the recent indexer executions, sorted in reverse chronological order. Required.

  • limits (SearchIndexerLimits) – The execution limits for the indexer. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchIndexerWarning(**kwargs: Any)[source]

Represents an item-level warning.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • key (str) – The key of the item which generated a warning.

  • message (str) – The message describing the warning that occurred while processing the item. Required.

  • name (str) – The name of the source at which the warning originated. For example, this could refer to a particular skill in the attached skillset. This may not be always available.

  • details (str) – Additional, verbose details about the warning to assist in debugging the indexer. This may not be always available.

  • documentation_link (str) – A link to a troubleshooting guide for these classes of warnings. This may not be always available.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchResourceEncryptionKey(*, key_name: str, key_version: str, vault_uri: str, application_id: str | None = None, application_secret: str | None = None, **kwargs)[source]

A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be used to encrypt or decrypt data-at-rest in Azure Cognitive Search, such as indexes and synonym maps.

All required parameters must be populated in order to send to Azure.

Variables:
  • key_name (str) – Required. The name of your Azure Key Vault key to be used to encrypt your data at rest.

  • key_version (str) – Required. The version of your Azure Key Vault key to be used to encrypt your data at rest.

  • vault_uri (str) – Required. The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my- keyvault-name.vault.azure.net.

  • application_id (str) – Required. An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application.

  • application_secret (str) – The authentication key of the specified AAD application.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SearchResourceEncryptionKey instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchResourceEncryptionKey instance

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SearchResourceEncryptionKey instance

Return type:

SearchResourceEncryptionKey

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

class azure.search.documents.indexes.models.SearchServiceCounters(*, document_counter: _models.ResourceCounter, index_counter: _models.ResourceCounter, indexer_counter: _models.ResourceCounter, data_source_counter: _models.ResourceCounter, storage_size_counter: _models.ResourceCounter, synonym_map_counter: _models.ResourceCounter, skillset_counter: _models.ResourceCounter, vector_index_size_counter: _models.ResourceCounter, **kwargs: Any)[source]

Represents service-level resource counters and quotas.

All required parameters must be populated in order to send to server.

Variables:
  • document_counter (ResourceCounter) – Total number of documents across all indexes in the service. Required.

  • index_counter (ResourceCounter) – Total number of indexes. Required.

  • indexer_counter (ResourceCounter) – Total number of indexers. Required.

  • data_source_counter (ResourceCounter) – Total number of data sources. Required.

  • storage_size_counter (ResourceCounter) – Total size of used storage in bytes. Required.

  • synonym_map_counter (ResourceCounter) – Total number of synonym maps. Required.

  • skillset_counter (ResourceCounter) – Total number of skillsets. Required.

  • vector_index_size_counter (ResourceCounter) – Total memory consumption of all vector indexes within the service, in bytes. Required.

Keyword Arguments:
  • document_counter (ResourceCounter) – Total number of documents across all indexes in the service. Required.

  • index_counter (ResourceCounter) – Total number of indexes. Required.

  • indexer_counter (ResourceCounter) – Total number of indexers. Required.

  • data_source_counter (ResourceCounter) – Total number of data sources. Required.

  • storage_size_counter (ResourceCounter) – Total size of used storage in bytes. Required.

  • synonym_map_counter (ResourceCounter) – Total number of synonym maps. Required.

  • skillset_counter (ResourceCounter) – Total number of skillsets. Required.

  • vector_index_size_counter (ResourceCounter) – Total memory consumption of all vector indexes within the service, in bytes. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchServiceLimits(*, max_fields_per_index: int | None = None, max_field_nesting_depth_per_index: int | None = None, max_complex_collection_fields_per_index: int | None = None, max_complex_objects_in_collections_per_document: int | None = None, max_storage_per_index_in_bytes: int | None = None, **kwargs: Any)[source]

Represents various service level limits.

Variables:
  • max_fields_per_index (int) – The maximum allowed fields per index.

  • max_field_nesting_depth_per_index (int) – The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3.

  • max_complex_collection_fields_per_index (int) – The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index.

  • max_complex_objects_in_collections_per_document (int) – The maximum number of objects in complex collections allowed per document.

  • max_storage_per_index_in_bytes (int) – The maximum amount of storage in bytes allowed per index.

Keyword Arguments:
  • max_fields_per_index (int) – The maximum allowed fields per index.

  • max_field_nesting_depth_per_index (int) – The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3.

  • max_complex_collection_fields_per_index (int) – The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index.

  • max_complex_objects_in_collections_per_document (int) – The maximum number of objects in complex collections allowed per document.

  • max_storage_per_index_in_bytes (int) – The maximum amount of storage in bytes allowed per index.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchServiceStatistics(*, counters: _models.SearchServiceCounters, limits: _models.SearchServiceLimits, **kwargs: Any)[source]

Response from a get service statistics request. If successful, it includes service level counters and limits.

All required parameters must be populated in order to send to server.

Variables:
Keyword Arguments:
as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SearchSuggester(*, name: str, source_fields: List[str], **kwargs: Any)[source]

Defines how the Suggest API should apply to a group of fields in the index.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the suggester. Required.

  • search_mode (str) – A value indicating the capabilities of the suggester. Required. Default value is “analyzingInfixMatching”.

  • source_fields (list[str]) – The list of field names to which the suggester applies. Each field must be searchable. Required.

Keyword Arguments:
  • name (str) – The name of the suggester. Required.

  • source_fields (list[str]) – The list of field names to which the suggester applies. Each field must be searchable. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

search_mode = 'analyzingInfixMatching'
class azure.search.documents.indexes.models.SemanticConfiguration(*, name: str, prioritized_fields: _models.SemanticPrioritizedFields, **kwargs: Any)[source]

Defines a specific configuration to be used in the context of semantic capabilities.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name of the semantic configuration. Required.

  • prioritized_fields (SemanticPrioritizedFields) – Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. Required.

Keyword Arguments:
  • name (str) – The name of the semantic configuration. Required.

  • prioritized_fields (SemanticPrioritizedFields) – Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SemanticField(*, field_name: str, **kwargs: Any)[source]

A field that is used as part of the semantic configuration.

All required parameters must be populated in order to send to server.

Variables:

field_name (str) – Required.

Keyword Arguments:

field_name (str) – Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SemanticPrioritizedFields(*, title_field: _models.SemanticField | None = None, content_fields: List[_models.SemanticField] | None = None, keywords_fields: List[_models.SemanticField] | None = None, **kwargs: Any)[source]

Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers.

Variables:
  • title_field (SemanticField) – Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don’t have a title field in your index, leave this blank.

  • content_fields (list[SemanticField]) – Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.

  • keywords_fields (list[SemanticField]) – Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.

Keyword Arguments:
  • title_field (SemanticField) – Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don’t have a title field in your index, leave this blank.

  • content_fields (list[SemanticField]) – Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.

  • keywords_fields (list[SemanticField]) – Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SemanticSearch(*, default_configuration_name: str | None = None, configurations: List[_models.SemanticConfiguration] | None = None, **kwargs: Any)[source]

Defines parameters for a search index that influence semantic capabilities.

Variables:
  • default_configuration_name (str) – Allows you to set the name of a default semantic configuration in your index, making it optional to pass it on as a query parameter every time.

  • configurations (list[SemanticConfiguration]) – The semantic configurations for the index.

Keyword Arguments:
  • default_configuration_name (str) – Allows you to set the name of a default semantic configuration in your index, making it optional to pass it on as a query parameter every time.

  • configurations (list[SemanticConfiguration]) – The semantic configurations for the index.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SentimentSkill(**kwargs)[source]

V1: Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero to 1. V3: Using the Text Analytics API, evaluates unstructured text and for each record, provides sentiment labels (such as “negative”, “neutral” and “positive”) based on the highest confidence score found by the service at a sentence and document-level.

All required parameters must be populated in order to send to Azure.

Variables:
  • odata_type (str) – Required. Identifies the concrete type of the skill.Constant filled by server.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill.

  • outputs (list[OutputFieldMappingEntry]) – Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill.

  • default_language_code (str or SentimentSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “nl”, “en”, “fi”, “fr”, “de”, “el”, “it”, “no”, “pl”, “pt-PT”, “ru”, “es”, “sv”, “tr”.

  • include_opinion_mining (bool) – If set to true, the skill output will include information from Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated assessment (adjective) in the text. Default is false.

  • model_version (str) – The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

  • skill_version (SentimentSkillVersion) – The version of the skill to use when calling the Text Analytics service. It will default to V1 when not specified.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SentimentSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Deprecated. The language codes supported for input text by SentimentSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DA = 'da'

Danish

DE = 'de'

German

EL = 'el'

Greek

EN = 'en'

English

ES = 'es'

Spanish

FI = 'fi'

Finnish

FR = 'fr'

French

IT = 'it'

Italian

NL = 'nl'

Dutch

NO = 'no'

Norwegian (Bokmaal)

PL = 'pl'

Polish

PT_PT = 'pt-PT'

Portuguese (Portugal)

RU = 'ru'

Russian

SV = 'sv'

Swedish

TR = 'tr'

Turkish

class azure.search.documents.indexes.models.SentimentSkillVersion(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Specifies the Sentiment Skill version to use.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

LATEST = '#Microsoft.Skills.Text.V3.SentimentSkill'

Use latest version of Sentiment skill.

V1 = '#Microsoft.Skills.Text.SentimentSkill'
V3 = '#Microsoft.Skills.Text.V3.SentimentSkill'

Use Sentiment skill V3.

class azure.search.documents.indexes.models.ShaperSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, **kwargs: Any)[source]

A skill for reshaping the outputs. It creates a complex type to support composite fields (also known as multipart fields).

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.ShingleTokenFilter(*, name: str, max_shingle_size: int = 2, min_shingle_size: int = 2, output_unigrams: bool = True, output_unigrams_if_no_shingles: bool = False, token_separator: str = ' ', filter_token: str = '_', **kwargs: Any)[source]

Creates combinations of tokens as a single token. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_shingle_size (int) – The maximum shingle size. Default and minimum value is 2.

  • min_shingle_size (int) – The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.

  • output_unigrams (bool) – A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true.

  • output_unigrams_if_no_shingles (bool) – A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false.

  • token_separator (str) – The string to use when joining adjacent tokens to form a shingle. Default is a single space (” “).

  • filter_token (str) – The string to insert for each position at which there is no token. Default is an underscore (“_”).

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_shingle_size (int) – The maximum shingle size. Default and minimum value is 2.

  • min_shingle_size (int) – The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.

  • output_unigrams (bool) – A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true.

  • output_unigrams_if_no_shingles (bool) – A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false.

  • token_separator (str) – The string to use when joining adjacent tokens to form a shingle. Default is a single space (” “).

  • filter_token (str) – The string to insert for each position at which there is no token. Default is an underscore (“_”).

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SimilarityAlgorithm(**kwargs: Any)[source]

Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: BM25SimilarityAlgorithm, ClassicSimilarityAlgorithm

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SnowballTokenFilter(*, name: str, language: str | _models.SnowballTokenFilterLanguage, **kwargs: Any)[source]

A filter that stems words using a Snowball-generated stemmer. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • language (str or SnowballTokenFilterLanguage) – The language to use. Required. Known values are: “armenian”, “basque”, “catalan”, “danish”, “dutch”, “english”, “finnish”, “french”, “german”, “german2”, “hungarian”, “italian”, “kp”, “lovins”, “norwegian”, “porter”, “portuguese”, “romanian”, “russian”, “spanish”, “swedish”, and “turkish”.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • language (str or SnowballTokenFilterLanguage) – The language to use. Required. Known values are: “armenian”, “basque”, “catalan”, “danish”, “dutch”, “english”, “finnish”, “french”, “german”, “german2”, “hungarian”, “italian”, “kp”, “lovins”, “norwegian”, “porter”, “portuguese”, “romanian”, “russian”, “spanish”, “swedish”, and “turkish”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SnowballTokenFilterLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language to use for a Snowball token filter.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ARMENIAN = 'armenian'

Selects the Lucene Snowball stemming tokenizer for Armenian.

BASQUE = 'basque'

Selects the Lucene Snowball stemming tokenizer for Basque.

CATALAN = 'catalan'

Selects the Lucene Snowball stemming tokenizer for Catalan.

DANISH = 'danish'

Selects the Lucene Snowball stemming tokenizer for Danish.

DUTCH = 'dutch'

Selects the Lucene Snowball stemming tokenizer for Dutch.

ENGLISH = 'english'

Selects the Lucene Snowball stemming tokenizer for English.

FINNISH = 'finnish'

Selects the Lucene Snowball stemming tokenizer for Finnish.

FRENCH = 'french'

Selects the Lucene Snowball stemming tokenizer for French.

GERMAN = 'german'

Selects the Lucene Snowball stemming tokenizer for German.

GERMAN2 = 'german2'

Selects the Lucene Snowball stemming tokenizer that uses the German variant algorithm.

HUNGARIAN = 'hungarian'

Selects the Lucene Snowball stemming tokenizer for Hungarian.

ITALIAN = 'italian'

Selects the Lucene Snowball stemming tokenizer for Italian.

KP = 'kp'

Selects the Lucene Snowball stemming tokenizer for Dutch that uses the Kraaij-Pohlmann stemming algorithm.

LOVINS = 'lovins'

Selects the Lucene Snowball stemming tokenizer for English that uses the Lovins stemming algorithm.

NORWEGIAN = 'norwegian'

Selects the Lucene Snowball stemming tokenizer for Norwegian.

PORTER = 'porter'

Selects the Lucene Snowball stemming tokenizer for English that uses the Porter stemming algorithm.

PORTUGUESE = 'portuguese'

Selects the Lucene Snowball stemming tokenizer for Portuguese.

ROMANIAN = 'romanian'

Selects the Lucene Snowball stemming tokenizer for Romanian.

RUSSIAN = 'russian'

Selects the Lucene Snowball stemming tokenizer for Russian.

SPANISH = 'spanish'

Selects the Lucene Snowball stemming tokenizer for Spanish.

SWEDISH = 'swedish'

Selects the Lucene Snowball stemming tokenizer for Swedish.

TURKISH = 'turkish'

Selects the Lucene Snowball stemming tokenizer for Turkish.

class azure.search.documents.indexes.models.SoftDeleteColumnDeletionDetectionPolicy(*, soft_delete_column_name: str | None = None, soft_delete_marker_value: str | None = None, **kwargs: Any)[source]

Defines a data deletion detection policy that implements a soft-deletion strategy. It determines whether an item should be deleted based on the value of a designated ‘soft delete’ column.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of data deletion detection policy. Required.

  • soft_delete_column_name (str) – The name of the column to use for soft-deletion detection.

  • soft_delete_marker_value (str) – The marker value that identifies an item as deleted.

Keyword Arguments:
  • soft_delete_column_name (str) – The name of the column to use for soft-deletion detection.

  • soft_delete_marker_value (str) – The marker value that identifies an item as deleted.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SplitSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], name: str | None = None, description: str | None = None, context: str | None = None, default_language_code: str | _models.SplitSkillLanguage | None = None, text_split_mode: str | _models.TextSplitMode | None = None, maximum_page_length: int | None = None, page_overlap_length: int | None = None, maximum_pages_to_take: int | None = None, **kwargs: Any)[source]

A skill to split a string into chunks of text.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or SplitSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “am”, “bs”, “cs”, “da”, “de”, “en”, “es”, “et”, “fi”, “fr”, “he”, “hi”, “hr”, “hu”, “id”, “is”, “it”, “ja”, “ko”, “lv”, “nb”, “nl”, “pl”, “pt”, “pt-br”, “ru”, “sk”, “sl”, “sr”, “sv”, “tr”, “ur”, “zh”, and “is”.

  • text_split_mode (str or TextSplitMode) – A value indicating which split mode to perform. Known values are: “pages” and “sentences”.

  • maximum_page_length (int) – The desired maximum page length. Default is 10000.

  • page_overlap_length (int) – Only applicable when textSplitMode is set to ‘pages’. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.

  • maximum_pages_to_take (int) – Only applicable when textSplitMode is set to ‘pages’. If specified, the SplitSkill will discontinue splitting after processing the first ‘maximumPagesToTake’ pages, in order to improve performance when only a few initial pages are needed from each document.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_language_code (str or SplitSkillLanguage) – A value indicating which language code to use. Default is en. Known values are: “am”, “bs”, “cs”, “da”, “de”, “en”, “es”, “et”, “fi”, “fr”, “he”, “hi”, “hr”, “hu”, “id”, “is”, “it”, “ja”, “ko”, “lv”, “nb”, “nl”, “pl”, “pt”, “pt-br”, “ru”, “sk”, “sl”, “sr”, “sv”, “tr”, “ur”, “zh”, and “is”.

  • text_split_mode (str or TextSplitMode) – A value indicating which split mode to perform. Known values are: “pages” and “sentences”.

  • maximum_page_length (int) – The desired maximum page length. Default is 10000.

  • page_overlap_length (int) – Only applicable when textSplitMode is set to ‘pages’. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.

  • maximum_pages_to_take (int) – Only applicable when textSplitMode is set to ‘pages’. If specified, the SplitSkill will discontinue splitting after processing the first ‘maximumPagesToTake’ pages, in order to improve performance when only a few initial pages are needed from each document.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SplitSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input text by SplitSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AM = 'am'

Amharic

BS = 'bs'

Bosnian

CS = 'cs'

Czech

DA = 'da'

Danish

DE = 'de'

German

EN = 'en'

English

ES = 'es'

Spanish

ET = 'et'

Estonian

FI = 'fi'

Finnish

FR = 'fr'

French

HE = 'he'

Hebrew

HI = 'hi'

Hindi

HR = 'hr'

Croatian

HU = 'hu'

Hungarian

ID = 'id'

Indonesian

IS = 'is'

Icelandic

IS_ENUM = 'is'

Icelandic

IT = 'it'

Italian

JA = 'ja'

Japanese

KO = 'ko'

Korean

LV = 'lv'

Latvian

NB = 'nb'

Norwegian

NL = 'nl'

Dutch

PL = 'pl'

Polish

PT = 'pt'

Portuguese (Portugal)

PT_BR = 'pt-br'

Portuguese (Brazil)

RU = 'ru'

Russian

SK = 'sk'

Slovak

SL = 'sl'

Slovenian

SR = 'sr'

Serbian

SV = 'sv'

Swedish

TR = 'tr'

Turkish

UR = 'ur'

Urdu

ZH = 'zh'

Chinese (Simplified)

class azure.search.documents.indexes.models.SqlIntegratedChangeTrackingPolicy(**kwargs: Any)[source]

Defines a data change detection policy that captures changes using the Integrated Change Tracking feature of Azure SQL Database.

All required parameters must be populated in order to send to server.

Variables:

odata_type (str) – A URI fragment specifying the type of data change detection policy. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.StemmerOverrideTokenFilter(*, name: str, rules: List[str], **kwargs: Any)[source]

Provides the ability to override other stemming filters with custom dictionary-based stemming. Any dictionary-stemmed terms will be marked as keywords so that they will not be stemmed with stemmers down the chain. Must be placed before any stemming filters. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • rules (list[str]) – A list of stemming rules in the following format: “word => stem”, for example: “ran => run”. Required.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • rules (list[str]) – A list of stemming rules in the following format: “word => stem”, for example: “ran => run”. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.StemmerTokenFilter(*, name: str, language: str | _models.StemmerTokenFilterLanguage, **kwargs: Any)[source]

Language specific stemming filter. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • language (str or StemmerTokenFilterLanguage) – The language to use. Required. Known values are: “arabic”, “armenian”, “basque”, “brazilian”, “bulgarian”, “catalan”, “czech”, “danish”, “dutch”, “dutchKp”, “english”, “lightEnglish”, “minimalEnglish”, “possessiveEnglish”, “porter2”, “lovins”, “finnish”, “lightFinnish”, “french”, “lightFrench”, “minimalFrench”, “galician”, “minimalGalician”, “german”, “german2”, “lightGerman”, “minimalGerman”, “greek”, “hindi”, “hungarian”, “lightHungarian”, “indonesian”, “irish”, “italian”, “lightItalian”, “sorani”, “latvian”, “norwegian”, “lightNorwegian”, “minimalNorwegian”, “lightNynorsk”, “minimalNynorsk”, “portuguese”, “lightPortuguese”, “minimalPortuguese”, “portugueseRslp”, “romanian”, “russian”, “lightRussian”, “spanish”, “lightSpanish”, “swedish”, “lightSwedish”, and “turkish”.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • language (str or StemmerTokenFilterLanguage) – The language to use. Required. Known values are: “arabic”, “armenian”, “basque”, “brazilian”, “bulgarian”, “catalan”, “czech”, “danish”, “dutch”, “dutchKp”, “english”, “lightEnglish”, “minimalEnglish”, “possessiveEnglish”, “porter2”, “lovins”, “finnish”, “lightFinnish”, “french”, “lightFrench”, “minimalFrench”, “galician”, “minimalGalician”, “german”, “german2”, “lightGerman”, “minimalGerman”, “greek”, “hindi”, “hungarian”, “lightHungarian”, “indonesian”, “irish”, “italian”, “lightItalian”, “sorani”, “latvian”, “norwegian”, “lightNorwegian”, “minimalNorwegian”, “lightNynorsk”, “minimalNynorsk”, “portuguese”, “lightPortuguese”, “minimalPortuguese”, “portugueseRslp”, “romanian”, “russian”, “lightRussian”, “spanish”, “lightSpanish”, “swedish”, “lightSwedish”, and “turkish”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.StemmerTokenFilterLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language to use for a stemmer token filter.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ARABIC = 'arabic'

Selects the Lucene stemming tokenizer for Arabic.

ARMENIAN = 'armenian'

Selects the Lucene stemming tokenizer for Armenian.

BASQUE = 'basque'

Selects the Lucene stemming tokenizer for Basque.

BRAZILIAN = 'brazilian'

Selects the Lucene stemming tokenizer for Portuguese (Brazil).

BULGARIAN = 'bulgarian'

Selects the Lucene stemming tokenizer for Bulgarian.

CATALAN = 'catalan'

Selects the Lucene stemming tokenizer for Catalan.

CZECH = 'czech'

Selects the Lucene stemming tokenizer for Czech.

DANISH = 'danish'

Selects the Lucene stemming tokenizer for Danish.

DUTCH = 'dutch'

Selects the Lucene stemming tokenizer for Dutch.

DUTCH_KP = 'dutchKp'

Selects the Lucene stemming tokenizer for Dutch that uses the Kraaij-Pohlmann stemming algorithm.

ENGLISH = 'english'

Selects the Lucene stemming tokenizer for English.

FINNISH = 'finnish'

Selects the Lucene stemming tokenizer for Finnish.

FRENCH = 'french'

Selects the Lucene stemming tokenizer for French.

GALICIAN = 'galician'

Selects the Lucene stemming tokenizer for Galician.

GERMAN = 'german'

Selects the Lucene stemming tokenizer for German.

GERMAN2 = 'german2'

Selects the Lucene stemming tokenizer that uses the German variant algorithm.

GREEK = 'greek'

Selects the Lucene stemming tokenizer for Greek.

HINDI = 'hindi'

Selects the Lucene stemming tokenizer for Hindi.

HUNGARIAN = 'hungarian'

Selects the Lucene stemming tokenizer for Hungarian.

INDONESIAN = 'indonesian'

Selects the Lucene stemming tokenizer for Indonesian.

IRISH = 'irish'

Selects the Lucene stemming tokenizer for Irish.

ITALIAN = 'italian'

Selects the Lucene stemming tokenizer for Italian.

LATVIAN = 'latvian'

Selects the Lucene stemming tokenizer for Latvian.

LIGHT_ENGLISH = 'lightEnglish'

Selects the Lucene stemming tokenizer for English that does light stemming.

LIGHT_FINNISH = 'lightFinnish'

Selects the Lucene stemming tokenizer for Finnish that does light stemming.

LIGHT_FRENCH = 'lightFrench'

Selects the Lucene stemming tokenizer for French that does light stemming.

LIGHT_GERMAN = 'lightGerman'

Selects the Lucene stemming tokenizer for German that does light stemming.

LIGHT_HUNGARIAN = 'lightHungarian'

Selects the Lucene stemming tokenizer for Hungarian that does light stemming.

LIGHT_ITALIAN = 'lightItalian'

Selects the Lucene stemming tokenizer for Italian that does light stemming.

LIGHT_NORWEGIAN = 'lightNorwegian'

Selects the Lucene stemming tokenizer for Norwegian (Bokmål) that does light stemming.

LIGHT_NYNORSK = 'lightNynorsk'

Selects the Lucene stemming tokenizer for Norwegian (Nynorsk) that does light stemming.

LIGHT_PORTUGUESE = 'lightPortuguese'

Selects the Lucene stemming tokenizer for Portuguese that does light stemming.

LIGHT_RUSSIAN = 'lightRussian'

Selects the Lucene stemming tokenizer for Russian that does light stemming.

LIGHT_SPANISH = 'lightSpanish'

Selects the Lucene stemming tokenizer for Spanish that does light stemming.

LIGHT_SWEDISH = 'lightSwedish'

Selects the Lucene stemming tokenizer for Swedish that does light stemming.

LOVINS = 'lovins'

Selects the Lucene stemming tokenizer for English that uses the Lovins stemming algorithm.

MINIMAL_ENGLISH = 'minimalEnglish'

Selects the Lucene stemming tokenizer for English that does minimal stemming.

MINIMAL_FRENCH = 'minimalFrench'

Selects the Lucene stemming tokenizer for French that does minimal stemming.

MINIMAL_GALICIAN = 'minimalGalician'

Selects the Lucene stemming tokenizer for Galician that does minimal stemming.

MINIMAL_GERMAN = 'minimalGerman'

Selects the Lucene stemming tokenizer for German that does minimal stemming.

MINIMAL_NORWEGIAN = 'minimalNorwegian'

Selects the Lucene stemming tokenizer for Norwegian (Bokmål) that does minimal stemming.

MINIMAL_NYNORSK = 'minimalNynorsk'

Selects the Lucene stemming tokenizer for Norwegian (Nynorsk) that does minimal stemming.

MINIMAL_PORTUGUESE = 'minimalPortuguese'

Selects the Lucene stemming tokenizer for Portuguese that does minimal stemming.

NORWEGIAN = 'norwegian'

Selects the Lucene stemming tokenizer for Norwegian (Bokmål).

PORTER2 = 'porter2'

Selects the Lucene stemming tokenizer for English that uses the Porter2 stemming algorithm.

PORTUGUESE = 'portuguese'

Selects the Lucene stemming tokenizer for Portuguese.

PORTUGUESE_RSLP = 'portugueseRslp'

Selects the Lucene stemming tokenizer for Portuguese that uses the RSLP stemming algorithm.

POSSESSIVE_ENGLISH = 'possessiveEnglish'

Selects the Lucene stemming tokenizer for English that removes trailing possessives from words.

ROMANIAN = 'romanian'

Selects the Lucene stemming tokenizer for Romanian.

RUSSIAN = 'russian'

Selects the Lucene stemming tokenizer for Russian.

SORANI = 'sorani'

Selects the Lucene stemming tokenizer for Sorani.

SPANISH = 'spanish'

Selects the Lucene stemming tokenizer for Spanish.

SWEDISH = 'swedish'

Selects the Lucene stemming tokenizer for Swedish.

TURKISH = 'turkish'

Selects the Lucene stemming tokenizer for Turkish.

class azure.search.documents.indexes.models.StopAnalyzer(*, name: str, stopwords: List[str] | None = None, **kwargs: Any)[source]

Divides text at non-letters; Applies the lowercase and stopword token filters. This analyzer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of analyzer. Required.

  • name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • stopwords (list[str]) – A list of stopwords.

Keyword Arguments:
  • name (str) – The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • stopwords (list[str]) – A list of stopwords.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.StopwordsList(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Identifies a predefined list of language-specific stopwords.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ARABIC = 'arabic'

Selects the stopword list for Arabic.

ARMENIAN = 'armenian'

Selects the stopword list for Armenian.

BASQUE = 'basque'

Selects the stopword list for Basque.

BRAZILIAN = 'brazilian'

Selects the stopword list for Portuguese (Brazil).

BULGARIAN = 'bulgarian'

Selects the stopword list for Bulgarian.

CATALAN = 'catalan'

Selects the stopword list for Catalan.

CZECH = 'czech'

Selects the stopword list for Czech.

DANISH = 'danish'

Selects the stopword list for Danish.

DUTCH = 'dutch'

Selects the stopword list for Dutch.

ENGLISH = 'english'

Selects the stopword list for English.

FINNISH = 'finnish'

Selects the stopword list for Finnish.

FRENCH = 'french'

Selects the stopword list for French.

GALICIAN = 'galician'

Selects the stopword list for Galician.

GERMAN = 'german'

Selects the stopword list for German.

GREEK = 'greek'

Selects the stopword list for Greek.

HINDI = 'hindi'

Selects the stopword list for Hindi.

HUNGARIAN = 'hungarian'

Selects the stopword list for Hungarian.

INDONESIAN = 'indonesian'

Selects the stopword list for Indonesian.

IRISH = 'irish'

Selects the stopword list for Irish.

ITALIAN = 'italian'

Selects the stopword list for Italian.

LATVIAN = 'latvian'

Selects the stopword list for Latvian.

NORWEGIAN = 'norwegian'

Selects the stopword list for Norwegian.

PERSIAN = 'persian'

Selects the stopword list for Persian.

PORTUGUESE = 'portuguese'

Selects the stopword list for Portuguese.

ROMANIAN = 'romanian'

Selects the stopword list for Romanian.

RUSSIAN = 'russian'

Selects the stopword list for Russian.

SORANI = 'sorani'

Selects the stopword list for Sorani.

SPANISH = 'spanish'

Selects the stopword list for Spanish.

SWEDISH = 'swedish'

Selects the stopword list for Swedish.

THAI = 'thai'

Selects the stopword list for Thai.

TURKISH = 'turkish'

Selects the stopword list for Turkish.

class azure.search.documents.indexes.models.StopwordsTokenFilter(*, name: str, stopwords: List[str] | None = None, stopwords_list: str | _models.StopwordsList | None = None, ignore_case: bool = False, remove_trailing_stop_words: bool = True, **kwargs: Any)[source]

Removes stop words from a token stream. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • stopwords (list[str]) – The list of stopwords. This property and the stopwords list property cannot both be set.

  • stopwords_list (str or StopwordsList) – A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Known values are: “arabic”, “armenian”, “basque”, “brazilian”, “bulgarian”, “catalan”, “czech”, “danish”, “dutch”, “english”, “finnish”, “french”, “galician”, “german”, “greek”, “hindi”, “hungarian”, “indonesian”, “irish”, “italian”, “latvian”, “norwegian”, “persian”, “portuguese”, “romanian”, “russian”, “sorani”, “spanish”, “swedish”, “thai”, and “turkish”.

  • ignore_case (bool) – A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.

  • remove_trailing_stop_words (bool) – A value indicating whether to ignore the last search term if it’s a stop word. Default is true.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • stopwords (list[str]) – The list of stopwords. This property and the stopwords list property cannot both be set.

  • stopwords_list (str or StopwordsList) – A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Known values are: “arabic”, “armenian”, “basque”, “brazilian”, “bulgarian”, “catalan”, “czech”, “danish”, “dutch”, “english”, “finnish”, “french”, “galician”, “german”, “greek”, “hindi”, “hungarian”, “indonesian”, “irish”, “italian”, “latvian”, “norwegian”, “persian”, “portuguese”, “romanian”, “russian”, “sorani”, “spanish”, “swedish”, “thai”, and “turkish”.

  • ignore_case (bool) – A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.

  • remove_trailing_stop_words (bool) – A value indicating whether to ignore the last search term if it’s a stop word. Default is true.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SuggestOptions(*, filter: str | None = None, use_fuzzy_matching: bool | None = None, highlight_post_tag: str | None = None, highlight_pre_tag: str | None = None, minimum_coverage: float | None = None, order_by: List[str] | None = None, search_fields: List[str] | None = None, select: List[str] | None = None, top: int | None = None, **kwargs: Any)[source]

Parameter group.

Variables:
  • filter (str) – An OData expression that filters the documents considered for suggestions.

  • use_fuzzy_matching (bool) – A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there’s a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources.

  • highlight_post_tag (str) – A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled.

  • highlight_pre_tag (str) – A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled.

  • minimum_coverage (float) – A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.

  • order_by (list[str]) – The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.

  • search_fields (list[str]) – The list of field names to search for the specified search text. Target fields must be included in the specified suggester.

  • select (list[str]) – The list of fields to retrieve. If unspecified, only the key field will be included in the results.

  • top (int) – The number of suggestions to retrieve. The value must be a number between 1 and 100. The default is 5.

Keyword Arguments:
  • filter (str) – An OData expression that filters the documents considered for suggestions.

  • use_fuzzy_matching (bool) – A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there’s a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources.

  • highlight_post_tag (str) – A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled.

  • highlight_pre_tag (str) – A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled.

  • minimum_coverage (float) – A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.

  • order_by (list[str]) – The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.

  • search_fields (list[str]) – The list of field names to search for the specified search text. Target fields must be included in the specified suggester.

  • select (list[str]) – The list of fields to retrieve. If unspecified, only the key field will be included in the results.

  • top (int) – The number of suggestions to retrieve. The value must be a number between 1 and 100. The default is 5.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.SynonymMap(*, name: str, synonyms: List[str], encryption_key: SearchResourceEncryptionKey | None = None, e_tag: str | None = None, **kwargs)[source]

Represents a synonym map definition.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables:
  • name (str) – Required. The name of the synonym map.

  • format (str) – Required. The format of the synonym map. Only the ‘solr’ format is currently supported. Default value: “solr”.

  • synonyms (list[str]) – Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

  • e_tag (str) – The ETag of the synonym map.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any][source]

Return a dict that can be serialized using json.dump.

Parameters:
  • keep_readonly (bool) – If you want to serialize the readonly attributes

  • key_transformer (Callable) – A callable that will transform the key of the dict

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) Self | None[source]

Parse a str using the RestAPI syntax and return a SynonymMap instance.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SynonymMap instance

Return type:

SynonymMap

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) Self | None[source]

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • key_extractors (Callable) – A callable that will extract a key from a dict

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

A SynonymMap instance

Return type:

SynonymMap

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any][source]

Return the JSON that would be sent to server from this model. :param bool keep_readonly: If you want to serialize the readonly attributes :returns: A dict JSON compatible object :rtype: dict

format = 'solr'
class azure.search.documents.indexes.models.SynonymTokenFilter(*, name: str, synonyms: List[str], ignore_case: bool = False, expand: bool = True, **kwargs: Any)[source]

Matches single or multi-word synonyms in a token stream. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • synonyms (list[str]) – A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. Required.

  • ignore_case (bool) – A value indicating whether to case-fold input for matching. Default is false.

  • expand (bool) – A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • synonyms (list[str]) – A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. Required.

  • ignore_case (bool) – A value indicating whether to case-fold input for matching. Default is false.

  • expand (bool) – A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TagScoringFunction(*, field_name: str, boost: float, parameters: _models.TagScoringParameters, interpolation: str | _models.ScoringFunctionInterpolation | None = None, **kwargs: Any)[source]

Defines a function that boosts scores of documents with string values matching a given list of tags.

All required parameters must be populated in order to send to server.

Variables:
  • type (str) – Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. Required.

  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (TagScoringParameters) – Parameter values for the tag scoring function. Required.

Keyword Arguments:
  • field_name (str) – The name of the field used as input to the scoring function. Required.

  • boost (float) – A multiplier for the raw score. Must be a positive number not equal to 1.0. Required.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Known values are: “linear”, “constant”, “quadratic”, and “logarithmic”.

  • parameters (TagScoringParameters) – Parameter values for the tag scoring function. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TagScoringParameters(*, tags_parameter: str, **kwargs: Any)[source]

Provides parameter values to a tag scoring function.

All required parameters must be populated in order to send to server.

Variables:

tags_parameter (str) – The name of the parameter passed in search queries to specify the list of tags to compare against the target field. Required.

Keyword Arguments:

tags_parameter (str) – The name of the parameter passed in search queries to specify the list of tags to compare against the target field. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TextSplitMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

A value indicating which split mode to perform.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

PAGES = 'pages'

Split the text into individual pages.

SENTENCES = 'sentences'

Split the text into individual sentences.

class azure.search.documents.indexes.models.TextTranslationSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], default_to_language_code: str | _models.TextTranslationSkillLanguage, name: str | None = None, description: str | None = None, context: str | None = None, default_from_language_code: str | _models.TextTranslationSkillLanguage | None = None, suggested_from: str | _models.TextTranslationSkillLanguage | None = None, **kwargs: Any)[source]

A skill to translate text from one language to another.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_to_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents into for documents that don’t specify the to language explicitly. Required. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

  • default_from_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents from for documents that don’t specify the from language explicitly. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

  • suggested_from (str or TextTranslationSkillLanguage) – The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • default_to_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents into for documents that don’t specify the to language explicitly. Required. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

  • default_from_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents from for documents that don’t specify the from language explicitly. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

  • suggested_from (str or TextTranslationSkillLanguage) – The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Known values are: “af”, “ar”, “bn”, “bs”, “bg”, “yue”, “ca”, “zh-Hans”, “zh-Hant”, “hr”, “cs”, “da”, “nl”, “en”, “et”, “fj”, “fil”, “fi”, “fr”, “de”, “el”, “ht”, “he”, “hi”, “mww”, “hu”, “is”, “id”, “it”, “ja”, “sw”, “tlh”, “tlh-Latn”, “tlh-Piqd”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “pt-br”, “pt-PT”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”, “ga”, “kn”, “mi”, “ml”, “pa”, and “is”.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TextTranslationSkillLanguage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The language codes supported for input text by TextTranslationSkill.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AF = 'af'

Afrikaans

AR = 'ar'

Arabic

BG = 'bg'

Bulgarian

BN = 'bn'

Bangla

BS = 'bs'

Bosnian (Latin)

CA = 'ca'

Catalan

CS = 'cs'

Czech

CY = 'cy'

Welsh

DA = 'da'

Danish

DE = 'de'

German

EL = 'el'

Greek

EN = 'en'

English

ES = 'es'

Spanish

ET = 'et'

Estonian

FA = 'fa'

Persian

FI = 'fi'

Finnish

FIL = 'fil'

Filipino

FJ = 'fj'

Fijian

FR = 'fr'

French

GA = 'ga'

Irish

HE = 'he'

Hebrew

HI = 'hi'

Hindi

HR = 'hr'

Croatian

HT = 'ht'

Haitian Creole

HU = 'hu'

Hungarian

ID = 'id'

Indonesian

IS = 'is'

Icelandic

IS_ENUM = 'is'

Icelandic

IT = 'it'

Italian

JA = 'ja'

Japanese

KN = 'kn'

Kannada

KO = 'ko'

Korean

LT = 'lt'

Lithuanian

LV = 'lv'

Latvian

MG = 'mg'

Malagasy

MI = 'mi'

Maori

ML = 'ml'

Malayalam

MS = 'ms'

Malay

MT = 'mt'

Maltese

MWW = 'mww'

Hmong Daw

NB = 'nb'

Norwegian

NL = 'nl'

Dutch

OTQ = 'otq'

Queretaro Otomi

PA = 'pa'

Punjabi

PL = 'pl'

Polish

PT = 'pt'

Portuguese

PT_BR = 'pt-br'

Portuguese (Brazil)

PT_PT = 'pt-PT'

Portuguese (Portugal)

RO = 'ro'

Romanian

RU = 'ru'

Russian

SK = 'sk'

Slovak

SL = 'sl'

Slovenian

SM = 'sm'

Samoan

SR_CYRL = 'sr-Cyrl'

Serbian (Cyrillic)

SR_LATN = 'sr-Latn'

Serbian (Latin)

SV = 'sv'

Swedish

SW = 'sw'

Kiswahili

TA = 'ta'

Tamil

TE = 'te'

Telugu

TH = 'th'

Thai

TLH = 'tlh'

Klingon

TLH_LATN = 'tlh-Latn'

Klingon (Latin script)

TLH_PIQD = 'tlh-Piqd'

Klingon (Klingon script)

TO = 'to'

Tongan

TR = 'tr'

Turkish

TY = 'ty'

Tahitian

UK = 'uk'

Ukrainian

UR = 'ur'

Urdu

VI = 'vi'

Vietnamese

YUA = 'yua'

Yucatec Maya

YUE = 'yue'

Cantonese (Traditional)

ZH_HANS = 'zh-Hans'

Chinese Simplified

ZH_HANT = 'zh-Hant'

Chinese Traditional

class azure.search.documents.indexes.models.TextWeights(*, weights: Dict[str, float], **kwargs: Any)[source]

Defines weights on index fields for which matches should boost scoring in search queries.

All required parameters must be populated in order to send to server.

Variables:

weights (dict[str, float]) – The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field. Required.

Keyword Arguments:

weights (dict[str, float]) – The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TokenCharacterKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Represents classes of characters on which a token filter can operate.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

DIGIT = 'digit'

Keeps digits in tokens.

LETTER = 'letter'

Keeps letters in tokens.

PUNCTUATION = 'punctuation'

Keeps punctuation in tokens.

SYMBOL = 'symbol'

Keeps symbols in tokens.

WHITESPACE = 'whitespace'

Keeps whitespace in tokens.

class azure.search.documents.indexes.models.TokenFilter(*, name: str, **kwargs: Any)[source]

Base type for token filters.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: AsciiFoldingTokenFilter, CjkBigramTokenFilter, CommonGramTokenFilter, DictionaryDecompounderTokenFilter, EdgeNGramTokenFilter, EdgeNGramTokenFilterV2, ElisionTokenFilter, KeepTokenFilter, KeywordMarkerTokenFilter, LengthTokenFilter, LimitTokenFilter, NGramTokenFilter, NGramTokenFilterV2, PatternCaptureTokenFilter, PatternReplaceTokenFilter, PhoneticTokenFilter, ShingleTokenFilter, SnowballTokenFilter, StemmerOverrideTokenFilter, StemmerTokenFilter, StopwordsTokenFilter, SynonymTokenFilter, TruncateTokenFilter, UniqueTokenFilter, WordDelimiterTokenFilter

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

Keyword Arguments:

name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.TokenFilterName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the names of all token filters supported by the search engine.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

APOSTROPHE = 'apostrophe'

Strips all characters after an apostrophe (including the apostrophe itself). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/tr/ApostropheFilter.html

ARABIC_NORMALIZATION = 'arabic_normalization'

A token filter that applies the Arabic normalizer to normalize the orthography. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ar/ArabicNormalizationFilter.html

ASCII_FOLDING = 'asciifolding'

Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the “Basic Latin” Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html

CJK_BIGRAM = 'cjk_bigram'

Forms bigrams of CJK terms that are generated from the standard tokenizer. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKBigramFilter.html

CJK_WIDTH = 'cjk_width'

Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKWidthFilter.html

CLASSIC = 'classic'

Removes English possessives, and dots from acronyms. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicFilter.html

COMMON_GRAM = 'common_grams'

Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/commongrams/CommonGramsFilter.html

EDGE_N_GRAM = 'edgeNGram_v2'

Generates n-grams of the given size(s) starting from the front or the back of an input token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.html

ELISION = 'elision'

Removes elisions. For example, “l’avion” (the plane) will be converted to “avion” (plane). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html

GERMAN_NORMALIZATION = 'german_normalization'

Normalizes German characters according to the heuristics of the German2 snowball algorithm. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/de/GermanNormalizationFilter.html

HINDI_NORMALIZATION = 'hindi_normalization'

Normalizes text in Hindi to remove some differences in spelling variations. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/hi/HindiNormalizationFilter.html

INDIC_NORMALIZATION = 'indic_normalization'

Normalizes the Unicode representation of text in Indian languages. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/in/IndicNormalizationFilter.html

KEYWORD_REPEAT = 'keyword_repeat'

Emits each incoming token twice, once as keyword and once as non-keyword. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/KeywordRepeatFilter.html

K_STEM = 'kstem'

A high-performance kstem filter for English. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/en/KStemFilter.html

LENGTH = 'length'

Removes words that are too long or too short. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LengthFilter.html

LIMIT = 'limit'

Limits the number of tokens while indexing. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilter.html

LOWERCASE = 'lowercase'

Normalizes token text to lower case. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html

N_GRAM = 'nGram_v2'

Generates n-grams of the given size(s). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilter.html

PERSIAN_NORMALIZATION = 'persian_normalization'

Applies normalization for Persian. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/fa/PersianNormalizationFilter.html

PHONETIC = 'phonetic'

Create tokens for phonetic matches. See https://lucene.apache.org/core/4_10_3/analyzers-phonetic/org/apache/lucene/analysis/phonetic/package-tree.html

PORTER_STEM = 'porter_stem'

Uses the Porter stemming algorithm to transform the token stream. See http://tartarus.org/~martin/PorterStemmer

REVERSE = 'reverse'

Reverses the token string. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html

SCANDINAVIAN_FOLDING_NORMALIZATION = 'scandinavian_folding'

Folds Scandinavian characters åÅäæÄÆ-&gt;a and öÖøØ-&gt;o. It also discriminates against use of double vowels aa, ae, ao, oe and oo, leaving just the first one. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilter.html

SCANDINAVIAN_NORMALIZATION = 'scandinavian_normalization'

Normalizes use of the interchangeable Scandinavian characters. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilter.html

SHINGLE = 'shingle'

Creates combinations of tokens as a single token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/shingle/ShingleFilter.html

SNOWBALL = 'snowball'

A filter that stems words using a Snowball-generated stemmer. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/snowball/SnowballFilter.html

SORANI_NORMALIZATION = 'sorani_normalization'

Normalizes the Unicode representation of Sorani text. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ckb/SoraniNormalizationFilter.html

STEMMER = 'stemmer'

Language specific stemming filter. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters

STOPWORDS = 'stopwords'

Removes stop words from a token stream. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html

TRIM = 'trim'

Trims leading and trailing whitespace from tokens. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TrimFilter.html

TRUNCATE = 'truncate'

Truncates the terms to a specific length. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilter.html

UNIQUE = 'unique'

Filters out tokens with same text as the previous token. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/RemoveDuplicatesTokenFilter.html

UPPERCASE = 'uppercase'

Normalizes token text to upper case. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html

WORD_DELIMITER = 'word_delimiter'

Splits words into subwords and performs optional transformations on subword groups.

class azure.search.documents.indexes.models.TruncateTokenFilter(*, name: str, length: int = 300, **kwargs: Any)[source]

Truncates the terms to a specific length. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • length (int) – The length at which terms will be truncated. Default and maximum is 300.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • length (int) – The length at which terms will be truncated. Default and maximum is 300.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.UaxUrlEmailTokenizer(*, name: str, max_token_length: int = 255, **kwargs: Any)[source]

Tokenizes urls and emails as one token. This tokenizer is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of tokenizer. Required.

  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

Keyword Arguments:
  • name (str) – The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.UniqueTokenFilter(*, name: str, only_on_same_position: bool = False, **kwargs: Any)[source]

Filters out tokens with same text as the previous token. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • only_on_same_position (bool) – A value indicating whether to remove duplicates only at the same position. Default is false.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • only_on_same_position (bool) – A value indicating whether to remove duplicates only at the same position. Default is false.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorEncodingFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The encoding format for interpreting vector field contents.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

PACKED_BIT = 'packedBit'

Encoding format representing bits packed into a wider data type.

class azure.search.documents.indexes.models.VectorSearch(*, profiles: List[_models.VectorSearchProfile] | None = None, algorithms: List[_models.VectorSearchAlgorithmConfiguration] | None = None, vectorizers: List[_models.VectorSearchVectorizer] | None = None, compressions: List[_models.VectorSearchCompression] | None = None, **kwargs: Any)[source]

Contains configuration options related to vector search.

Variables:
Keyword Arguments:
as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorSearchAlgorithmConfiguration(*, name: str, **kwargs: Any)[source]

Contains configuration options specific to the algorithm used during indexing or querying.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ExhaustiveKnnAlgorithmConfiguration, HnswAlgorithmConfiguration

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchAlgorithmKind) – The name of the kind of algorithm being configured for use with vector search. Required. Known values are: “hnsw” and “exhaustiveKnn”.

Keyword Arguments:

name (str) – The name to associate with this particular configuration. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorSearchAlgorithmKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The algorithm used for indexing and querying.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

EXHAUSTIVE_KNN = 'exhaustiveKnn'

Exhaustive KNN algorithm which will perform brute-force search.

HNSW = 'hnsw'

HNSW (Hierarchical Navigable Small World), a type of approximate nearest neighbors algorithm.

class azure.search.documents.indexes.models.VectorSearchAlgorithmMetric(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The similarity metric to use for vector comparisons. It is recommended to choose the same similarity metric as the embedding model was trained on.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

COSINE = 'cosine'

Measures the angle between vectors to quantify their similarity, disregarding magnitude. The smaller the angle, the closer the similarity.

DOT_PRODUCT = 'dotProduct'

Calculates the sum of element-wise products to gauge alignment and magnitude similarity. The larger and more positive, the closer the similarity.

EUCLIDEAN = 'euclidean'

Computes the straight-line distance between vectors in a multi-dimensional space. The smaller the distance, the closer the similarity.

HAMMING = 'hamming'

Only applicable to bit-packed binary data types. Determines dissimilarity by counting differing positions in binary vectors. The fewer differences, the closer the similarity.

class azure.search.documents.indexes.models.VectorSearchCompression(*, compression_name: str, rerank_with_original_vectors: bool = True, default_oversampling: float | None = None, **kwargs: Any)[source]

Contains configuration options specific to the compression method used during indexing or querying.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: BinaryQuantizationCompression, ScalarQuantizationCompression

All required parameters must be populated in order to send to server.

Variables:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • kind (str or VectorSearchCompressionKind) – The name of the kind of compression method being configured for use with vector search. Required. Known values are: “scalarQuantization” and “binaryQuantization”.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

Keyword Arguments:
  • compression_name (str) – The name to associate with this particular configuration. Required.

  • rerank_with_original_vectors (bool) – If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency.

  • default_oversampling (float) – Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorSearchCompressionTarget(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The quantized data type of compressed vector values.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

INT8 = 'int8'
class azure.search.documents.indexes.models.VectorSearchProfile(*, name: str, algorithm_configuration_name: str, vectorizer_name: str | None = None, compression_name: str | None = None, **kwargs: Any)[source]

Defines a combination of configurations to use with vector search.

All required parameters must be populated in order to send to server.

Variables:
  • name (str) – The name to associate with this particular vector search profile. Required.

  • algorithm_configuration_name (str) – The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. Required.

  • vectorizer_name (str) – The name of the vectorization being configured for use with vector search.

  • compression_name (str) – The name of the compression method configuration that specifies the compression method and optional parameters.

Keyword Arguments:
  • name (str) – The name to associate with this particular vector search profile. Required.

  • algorithm_configuration_name (str) – The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. Required.

  • vectorizer_name (str) – The name of the vectorization being configured for use with vector search.

  • compression_name (str) – The name of the compression method configuration that specifies the compression method and optional parameters.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorSearchVectorizer(*, vectorizer_name: str, **kwargs: Any)[source]

Specifies the vectorization method to be used during query time.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureOpenAIVectorizer, WebApiVectorizer

All required parameters must be populated in order to send to server.

Variables:
  • vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

  • kind (str or VectorSearchVectorizerKind) – The name of the kind of vectorization method being configured for use with vector search. Required. Known values are: “azureOpenAI” and “customWebApi”.

Keyword Arguments:

vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.VectorSearchVectorizerKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The vectorization method to be used during query time.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

AZURE_OPEN_AI = 'azureOpenAI'

Generate embeddings using an Azure OpenAI resource at query time.

CUSTOM_WEB_API = 'customWebApi'

Generate embeddings using a custom web endpoint at query time.

class azure.search.documents.indexes.models.VisualFeature(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The strings indicating what visual feature types to return.

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

removeprefix(prefix, /)

Return a str with the given prefix string removed if present.

If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.

removesuffix(suffix, /)

Return a str with the given suffix string removed if present.

If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.

replace(old, new, count=-1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the end of the string and works to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=-1)

Return a list of the substrings in the string, using sep as the separator string.

sep

The separator used to split the string.

When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.

maxsplit

Maximum number of splits. -1 (the default value) means no limit.

Splitting starts at the front of the string and works to the end.

Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

ADULT = 'adult'

Visual features recognized as adult persons.

BRANDS = 'brands'

Visual features recognized as commercial brands.

CATEGORIES = 'categories'

Categories.

DESCRIPTION = 'description'

Description.

FACES = 'faces'

Visual features recognized as people faces.

OBJECTS = 'objects'

Visual features recognized as objects.

TAGS = 'tags'

Tags.

class azure.search.documents.indexes.models.WebApiSkill(*, inputs: List[_models.InputFieldMappingEntry], outputs: List[_models.OutputFieldMappingEntry], uri: str, name: str | None = None, description: str | None = None, context: str | None = None, http_headers: Dict[str, str] | None = None, http_method: str | None = None, timeout: timedelta | None = None, batch_size: int | None = None, degree_of_parallelism: int | None = None, auth_resource_id: str | None = None, auth_identity: _models.SearchIndexerDataIdentity | None = None, **kwargs: Any)[source]

A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of skill. Required.

  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • uri (str) – The url for the Web API. Required.

  • http_headers (dict[str, str]) – The headers required to make the http request.

  • http_method (str) – The method for the http request.

  • timeout (timedelta) – The desired timeout for the request. Default is 30 seconds.

  • batch_size (int) – The desired batch size which indicates number of documents.

  • degree_of_parallelism (int) – If set, the number of parallel calls that can be made to the Web API.

  • auth_resource_id (str) – Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it’s not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to “none”, the value of this property is cleared.

Keyword Arguments:
  • name (str) – The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character ‘#’.

  • description (str) – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context (str) – Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

  • inputs (list[InputFieldMappingEntry]) – Inputs of the skills could be a column in the source data set, or the output of an upstream skill. Required.

  • outputs (list[OutputFieldMappingEntry]) – The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. Required.

  • uri (str) – The url for the Web API. Required.

  • http_headers (dict[str, str]) – The headers required to make the http request.

  • http_method (str) – The method for the http request.

  • timeout (timedelta) – The desired timeout for the request. Default is 30 seconds.

  • batch_size (int) – The desired batch size which indicates number of documents.

  • degree_of_parallelism (int) – If set, the number of parallel calls that can be made to the Web API.

  • auth_resource_id (str) – Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it’s not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to “none”, the value of this property is cleared.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.WebApiVectorizer(*, vectorizer_name: str, web_api_parameters: _models.WebApiVectorizerParameters | None = None, **kwargs: Any)[source]

Specifies a user-defined vectorizer for generating the vector embedding of a query string. Integration of an external vectorizer is achieved using the custom Web API interface of a skillset.

All required parameters must be populated in order to send to server.

Variables:
  • vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

  • kind (str or VectorSearchVectorizerKind) – The name of the kind of vectorization method being configured for use with vector search. Required. Known values are: “azureOpenAI” and “customWebApi”.

  • web_api_parameters (WebApiVectorizerParameters) – Specifies the properties of the user-defined vectorizer.

Keyword Arguments:
  • vectorizer_name (str) – The name to associate with this particular vectorization method. Required.

  • web_api_parameters (WebApiVectorizerParameters) – Specifies the properties of the user-defined vectorizer.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.WebApiVectorizerParameters(*, url: str | None = None, http_headers: Dict[str, str] | None = None, http_method: str | None = None, timeout: timedelta | None = None, auth_resource_id: str | None = None, auth_identity: _models.SearchIndexerDataIdentity | None = None, **kwargs: Any)[source]

Specifies the properties for connecting to a user-defined vectorizer.

Variables:
  • url (str) – The URI of the Web API providing the vectorizer.

  • http_headers (dict[str, str]) – The headers required to make the HTTP request.

  • http_method (str) – The method for the HTTP request.

  • timeout (timedelta) – The desired timeout for the request. Default is 30 seconds.

  • auth_resource_id (str) – Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it’s not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to “none”, the value of this property is cleared.

Keyword Arguments:
  • url (str) – The URI of the Web API providing the vectorizer.

  • http_headers (dict[str, str]) – The headers required to make the HTTP request.

  • http_method (str) – The method for the HTTP request.

  • timeout (timedelta) – The desired timeout for the request. Default is 30 seconds.

  • auth_resource_id (str) – Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.

  • auth_identity (SearchIndexerDataIdentity) – The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it’s not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to “none”, the value of this property is cleared.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

class azure.search.documents.indexes.models.WordDelimiterTokenFilter(*, name: str, generate_word_parts: bool = True, generate_number_parts: bool = True, catenate_words: bool = False, catenate_numbers: bool = False, catenate_all: bool = False, split_on_case_change: bool = True, preserve_original: bool = False, split_on_numerics: bool = True, stem_english_possessive: bool = True, protected_words: List[str] | None = None, **kwargs: Any)[source]

Splits words into subwords and performs optional transformations on subword groups. This token filter is implemented using Apache Lucene.

All required parameters must be populated in order to send to server.

Variables:
  • odata_type (str) – A URI fragment specifying the type of token filter. Required.

  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • generate_word_parts (bool) – A value indicating whether to generate part words. If set, causes parts of words to be generated; for example “AzureSearch” becomes “Azure” “Search”. Default is true.

  • generate_number_parts (bool) – A value indicating whether to generate number subwords. Default is true.

  • catenate_words (bool) – A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, “Azure-Search” becomes “AzureSearch”. Default is false.

  • catenate_numbers (bool) – A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, “1-2” becomes “12”. Default is false.

  • catenate_all (bool) – A value indicating whether all subword parts will be catenated. For example, if this is set to true, “Azure-Search-1” becomes “AzureSearch1”. Default is false.

  • split_on_case_change (bool) – A value indicating whether to split words on caseChange. For example, if this is set to true, “AzureSearch” becomes “Azure” “Search”. Default is true.

  • preserve_original (bool) – A value indicating whether original words will be preserved and added to the subword list. Default is false.

  • split_on_numerics (bool) – A value indicating whether to split on numbers. For example, if this is set to true, “Azure1Search” becomes “Azure” “1” “Search”. Default is true.

  • stem_english_possessive (bool) – A value indicating whether to remove trailing “‘s” for each subword. Default is true.

  • protected_words (list[str]) – A list of tokens to protect from being delimited.

Keyword Arguments:
  • name (str) – The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. Required.

  • generate_word_parts (bool) – A value indicating whether to generate part words. If set, causes parts of words to be generated; for example “AzureSearch” becomes “Azure” “Search”. Default is true.

  • generate_number_parts (bool) – A value indicating whether to generate number subwords. Default is true.

  • catenate_words (bool) – A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, “Azure-Search” becomes “AzureSearch”. Default is false.

  • catenate_numbers (bool) – A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, “1-2” becomes “12”. Default is false.

  • catenate_all (bool) – A value indicating whether all subword parts will be catenated. For example, if this is set to true, “Azure-Search-1” becomes “AzureSearch1”. Default is false.

  • split_on_case_change (bool) – A value indicating whether to split words on caseChange. For example, if this is set to true, “AzureSearch” becomes “Azure” “Search”. Default is true.

  • preserve_original (bool) – A value indicating whether original words will be preserved and added to the subword list. Default is false.

  • split_on_numerics (bool) – A value indicating whether to split on numbers. For example, if this is set to true, “Azure1Search” becomes “Azure” “1” “Search”. Default is true.

  • stem_english_possessive (bool) – A value indicating whether to remove trailing “‘s” for each subword. Default is true.

  • protected_words (list[str]) – A list of tokens to protect from being delimited.

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, ~typing.Dict[str, ~typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) MutableMapping[str, Any]

Return a dict that can be serialized using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

key_transformer (function) – A key transformer function.

Returns:

A dict JSON compatible object

Return type:

dict

classmethod deserialize(data: Any, content_type: str | None = None) ModelType

Parse a str using the RestAPI syntax and return a model.

Parameters:
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod enable_additional_properties_sending() None
classmethod from_dict(data: Any, key_extractors: Callable[[str, Dict[str, Any], Any], Any] | None = None, content_type: str | None = None) ModelType

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters:
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns:

An instance of this model

Raises:

DeserializationError if something went wrong

classmethod is_xml_model() bool
serialize(keep_readonly: bool = False, **kwargs: Any) MutableMapping[str, Any]

Return the JSON that would be sent to server from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters:

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns:

A dict JSON compatible object

Return type:

dict

azure.search.documents.indexes.models.ComplexField(*, name: str, collection: bool = False, fields: List[SearchField] | None = None, **kw) SearchField[source]

Configure a Complex or Complex collection field for an Azure Search Index

Keyword Arguments:
  • name (str) – Required. The name of the field, which must be unique within the fields collection of the index or parent field.

  • collection (bool) – Whether this complex field is a collection (default False)

  • fields (list[SearchField]) – A list of sub-fields

Returns:

The search field object.

Return type:

SearchField

azure.search.documents.indexes.models.SearchableField(*, name: str, collection: bool = False, key: bool = False, hidden: bool = False, searchable: bool = True, filterable: bool = False, sortable: bool = False, facetable: bool = False, analyzer_name: str | LexicalAnalyzerName | None = None, search_analyzer_name: str | LexicalAnalyzerName | None = None, index_analyzer_name: str | LexicalAnalyzerName | None = None, synonym_map_names: List[str] | None = None, **kw) SearchField[source]

Configure a searchable text field for an Azure Search Index

Keyword Arguments:
  • name (str) – Required. The name of the field, which must be unique within the fields collection of the index or parent field.

  • collection (bool) – Whether this search field is a collection (default False)

  • key (bool) – A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type SearchFieldDataType.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is False

  • hidden (bool) – A value indicating whether the field can be returned in a search result. You can enable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be False for key fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is False.

  • searchable (bool) – A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like “sunny day”, internally it will be split into the individual tokens “sunny” and “day”. This enables full-text searches for these terms. Note: searchable fields consume extra space in your index since Azure Cognitive Search will store an additional tokenized version of the field value for full-text searches. If you want to save space in your index and you don’t need a field to be included in searches, set searchable to false. Default is True.

  • filterable (bool) – A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to “sunny day”, $filter=f eq ‘sunny’ will find no matches, but $filter=f eq ‘sunny day’ will. Default is False.

  • sortable (bool) – A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. The default is False.

  • facetable (bool) – A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). Default is False.

  • analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer to use for the field. This option can’t be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Possible values include: ‘ar.microsoft’, ‘ar.lucene’, ‘hy.lucene’, ‘bn.microsoft’, ‘eu.lucene’, ‘bg.microsoft’, ‘bg.lucene’, ‘ca.microsoft’, ‘ca.lucene’, ‘zh- Hans.microsoft’, ‘zh-Hans.lucene’, ‘zh-Hant.microsoft’, ‘zh-Hant.lucene’, ‘hr.microsoft’, ‘cs.microsoft’, ‘cs.lucene’, ‘da.microsoft’, ‘da.lucene’, ‘nl.microsoft’, ‘nl.lucene’, ‘en.microsoft’, ‘en.lucene’, ‘et.microsoft’, ‘fi.microsoft’, ‘fi.lucene’, ‘fr.microsoft’, ‘fr.lucene’, ‘gl.lucene’, ‘de.microsoft’, ‘de.lucene’, ‘el.microsoft’, ‘el.lucene’, ‘gu.microsoft’, ‘he.microsoft’, ‘hi.microsoft’, ‘hi.lucene’, ‘hu.microsoft’, ‘hu.lucene’, ‘is.microsoft’, ‘id.microsoft’, ‘id.lucene’, ‘ga.lucene’, ‘it.microsoft’, ‘it.lucene’, ‘ja.microsoft’, ‘ja.lucene’, ‘kn.microsoft’, ‘ko.microsoft’, ‘ko.lucene’, ‘lv.microsoft’, ‘lv.lucene’, ‘lt.microsoft’, ‘ml.microsoft’, ‘ms.microsoft’, ‘mr.microsoft’, ‘nb.microsoft’, ‘no.lucene’, ‘fa.lucene’, ‘pl.microsoft’, ‘pl.lucene’, ‘pt-BR.microsoft’, ‘pt-BR.lucene’, ‘pt- PT.microsoft’, ‘pt-PT.lucene’, ‘pa.microsoft’, ‘ro.microsoft’, ‘ro.lucene’, ‘ru.microsoft’, ‘ru.lucene’, ‘sr-cyrillic.microsoft’, ‘sr-latin.microsoft’, ‘sk.microsoft’, ‘sl.microsoft’, ‘es.microsoft’, ‘es.lucene’, ‘sv.microsoft’, ‘sv.lucene’, ‘ta.microsoft’, ‘te.microsoft’, ‘th.microsoft’, ‘th.lucene’, ‘tr.microsoft’, ‘tr.lucene’, ‘uk.microsoft’, ‘ur.microsoft’, ‘vi.microsoft’, ‘standard.lucene’, ‘standardasciifolding.lucene’, ‘keyword’, ‘pattern’, ‘simple’, ‘stop’, ‘whitespace’.

  • search_analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer used at search time for the field. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Possible values include: ‘ar.microsoft’, ‘ar.lucene’, ‘hy.lucene’, ‘bn.microsoft’, ‘eu.lucene’, ‘bg.microsoft’, ‘bg.lucene’, ‘ca.microsoft’, ‘ca.lucene’, ‘zh-Hans.microsoft’, ‘zh-Hans.lucene’, ‘zh- Hant.microsoft’, ‘zh-Hant.lucene’, ‘hr.microsoft’, ‘cs.microsoft’, ‘cs.lucene’, ‘da.microsoft’, ‘da.lucene’, ‘nl.microsoft’, ‘nl.lucene’, ‘en.microsoft’, ‘en.lucene’, ‘et.microsoft’, ‘fi.microsoft’, ‘fi.lucene’, ‘fr.microsoft’, ‘fr.lucene’, ‘gl.lucene’, ‘de.microsoft’, ‘de.lucene’, ‘el.microsoft’, ‘el.lucene’, ‘gu.microsoft’, ‘he.microsoft’, ‘hi.microsoft’, ‘hi.lucene’, ‘hu.microsoft’, ‘hu.lucene’, ‘is.microsoft’, ‘id.microsoft’, ‘id.lucene’, ‘ga.lucene’, ‘it.microsoft’, ‘it.lucene’, ‘ja.microsoft’, ‘ja.lucene’, ‘kn.microsoft’, ‘ko.microsoft’, ‘ko.lucene’, ‘lv.microsoft’, ‘lv.lucene’, ‘lt.microsoft’, ‘ml.microsoft’, ‘ms.microsoft’, ‘mr.microsoft’, ‘nb.microsoft’, ‘no.lucene’, ‘fa.lucene’, ‘pl.microsoft’, ‘pl.lucene’, ‘pt-BR.microsoft’, ‘pt-BR.lucene’, ‘pt-PT.microsoft’, ‘pt-PT.lucene’, ‘pa.microsoft’, ‘ro.microsoft’, ‘ro.lucene’, ‘ru.microsoft’, ‘ru.lucene’, ‘sr- cyrillic.microsoft’, ‘sr-latin.microsoft’, ‘sk.microsoft’, ‘sl.microsoft’, ‘es.microsoft’, ‘es.lucene’, ‘sv.microsoft’, ‘sv.lucene’, ‘ta.microsoft’, ‘te.microsoft’, ‘th.microsoft’, ‘th.lucene’, ‘tr.microsoft’, ‘tr.lucene’, ‘uk.microsoft’, ‘ur.microsoft’, ‘vi.microsoft’, ‘standard.lucene’, ‘standardasciifolding.lucene’, ‘keyword’, ‘pattern’, ‘simple’, ‘stop’, ‘whitespace’.

  • index_analyzer_name (str or LexicalAnalyzerName) – The name of the analyzer used at indexing time for the field. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Possible values include: ‘ar.microsoft’, ‘ar.lucene’, ‘hy.lucene’, ‘bn.microsoft’, ‘eu.lucene’, ‘bg.microsoft’, ‘bg.lucene’, ‘ca.microsoft’, ‘ca.lucene’, ‘zh-Hans.microsoft’, ‘zh- Hans.lucene’, ‘zh-Hant.microsoft’, ‘zh-Hant.lucene’, ‘hr.microsoft’, ‘cs.microsoft’, ‘cs.lucene’, ‘da.microsoft’, ‘da.lucene’, ‘nl.microsoft’, ‘nl.lucene’, ‘en.microsoft’, ‘en.lucene’, ‘et.microsoft’, ‘fi.microsoft’, ‘fi.lucene’, ‘fr.microsoft’, ‘fr.lucene’, ‘gl.lucene’, ‘de.microsoft’, ‘de.lucene’, ‘el.microsoft’, ‘el.lucene’, ‘gu.microsoft’, ‘he.microsoft’, ‘hi.microsoft’, ‘hi.lucene’, ‘hu.microsoft’, ‘hu.lucene’, ‘is.microsoft’, ‘id.microsoft’, ‘id.lucene’, ‘ga.lucene’, ‘it.microsoft’, ‘it.lucene’, ‘ja.microsoft’, ‘ja.lucene’, ‘kn.microsoft’, ‘ko.microsoft’, ‘ko.lucene’, ‘lv.microsoft’, ‘lv.lucene’, ‘lt.microsoft’, ‘ml.microsoft’, ‘ms.microsoft’, ‘mr.microsoft’, ‘nb.microsoft’, ‘no.lucene’, ‘fa.lucene’, ‘pl.microsoft’, ‘pl.lucene’, ‘pt-BR.microsoft’, ‘pt-BR.lucene’, ‘pt-PT.microsoft’, ‘pt-PT.lucene’, ‘pa.microsoft’, ‘ro.microsoft’, ‘ro.lucene’, ‘ru.microsoft’, ‘ru.lucene’, ‘sr- cyrillic.microsoft’, ‘sr-latin.microsoft’, ‘sk.microsoft’, ‘sl.microsoft’, ‘es.microsoft’, ‘es.lucene’, ‘sv.microsoft’, ‘sv.lucene’, ‘ta.microsoft’, ‘te.microsoft’, ‘th.microsoft’, ‘th.lucene’, ‘tr.microsoft’, ‘tr.lucene’, ‘uk.microsoft’, ‘ur.microsoft’, ‘vi.microsoft’, ‘standard.lucene’, ‘standardasciifolding.lucene’, ‘keyword’, ‘pattern’, ‘simple’, ‘stop’, ‘whitespace’.

  • synonym_map_names (list[str]) – A list of the names of synonym maps to associate with this field. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields.

Returns:

The search field object.

Return type:

SearchField

azure.search.documents.indexes.models.SimpleField(*, name: str, type: str, key: bool = False, hidden: bool = False, filterable: bool = False, sortable: bool = False, facetable: bool = False, **kw) SearchField[source]

Configure a simple field for an Azure Search Index

Keyword Arguments:
  • name (str) – Required. The name of the field, which must be unique within the fields collection of the index or parent field.

  • type (str) – Required. The data type of the field. Possible values include: SearchFieldDataType.String, SearchFieldDataType.Int32, SearchFieldDataType.Int64, SearchFieldDataType.Double, SearchFieldDataType.Boolean, SearchFieldDataType.DateTimeOffset, SearchFieldDataType.GeographyPoint, SearchFieldDataType.ComplexType, from azure.search.documents.SearchFieldDataType.

  • key (bool) – A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type SearchFieldDataType.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is False

  • hidden (bool) – A value indicating whether the field can be returned in a search result. You can enable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be False for key fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is False.

  • filterable (bool) – A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type SearchFieldDataType.String or Collection(SearchFieldDataType.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to “sunny day”, $filter=f eq ‘sunny’ will find no matches, but $filter=f eq ‘sunny day’ will. This property must be null for complex fields. Default is False

  • sortable (bool) – A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it’s an immediate parent field, or an ancestor field, that’s the complex collection. The default is False.

  • facetable (bool) – A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). Fields of type SearchFieldDataType.GeographyPoint or Collection(SearchFieldDataType.GeographyPoint) cannot be facetable. Default is False.

Returns:

The search field object.

Return type:

SearchField