azure.search.documents.indexes.models package

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

The result of testing an analyzer on text.

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

Variables

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

Keyword Arguments

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

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.AnalyzeTextOptions(**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.

Keyword Arguments
  • 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”.

  • normalizer_name (str or LexicalNormalizerName) – The name of the normalizer to use to normalize the given text. Possible values include: “asciifolding”, “elision”, “lowercase”, “standard”, “uppercase”.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.AnalyzedTokenInfo(**kwargs)[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 Azure.

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

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

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

  • position (int) – Required. 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.AsciiFoldingTokenFilter(*, name: str, preserve_original: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

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

Keyword Arguments
  • name (str) – Required. 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.

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

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.AzureMachineLearningSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, scoring_uri: Optional[str] = None, authentication_key: Optional[str] = None, resource_id: Optional[str] = None, timeout: Optional[datetime.timedelta] = None, region: Optional[str] = None, degree_of_parallelism: Optional[int] = None, **kwargs)[source]

The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment.

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.

  • scoring_uri (str) – (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed.

  • authentication_key (str) – (Required for key authentication) The key for the AML service.

  • resource_id (str) – (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}.

  • timeout (timedelta) – (Optional) When specified, indicates the timeout for the http client making the API call.

  • region (str) – (Optional for token authentication). The region the AML service is deployed in.

  • degree_of_parallelism (int) – (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1.

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]) – 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.

  • scoring_uri (str) – (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed.

  • authentication_key (str) – (Required for key authentication) The key for the AML service.

  • resource_id (str) – (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}.

  • timeout (timedelta) – (Optional) When specified, indicates the timeout for the http client making the API call.

  • region (str) – (Optional for token authentication). The region the AML service is deployed in.

  • degree_of_parallelism (int) – (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.BM25Similarity(*, k1: Optional[float] = None, b: Optional[float] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Constant filled by server.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CharFilter(*, name: str, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the char filter.Constant filled by server.

  • name (str) – Required. 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.

Keyword Arguments

name (str) – Required. 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CjkBigramTokenFilter(*, name: str, ignore_scripts: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.CjkBigramTokenFilterScripts]]] = None, output_unigrams: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ClassicSimilarity(**kwargs)[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 Azure.

Variables

odata_type (str) – Required. Constant filled by server.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ClassicTokenizer(*, name: str, max_token_length: Optional[int] = 255, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CognitiveServicesAccount(*, description: Optional[str] = None, **kwargs)[source]

Base type for describing any cognitive 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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server.

  • description (str) – Description of the cognitive service resource attached to a skillset.

Keyword Arguments

description (str) – Description of the cognitive service resource attached to a skillset.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CognitiveServicesAccountKey(*, key: str, description: Optional[str] = None, **kwargs)[source]

A cognitive service resource provisioned with a key that is attached to a skillset.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server.

  • description (str) – Description of the cognitive service resource attached to a skillset.

  • key (str) – Required. The key used to provision the cognitive service resource attached to a skillset.

Keyword Arguments
  • description (str) – Description of the cognitive service resource attached to a skillset.

  • key (str) – Required. The key used to provision the cognitive service resource attached to a skillset.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CommonGramTokenFilter(*, name: str, common_words: List[str], ignore_case: Optional[bool] = False, use_query_mode: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • common_words (list[str]) – Required. The set of common words.

  • 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) – Required. 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.

  • common_words (list[str]) – Required. The set of common words.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ConditionalSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, **kwargs)[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 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.

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]) – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CorsOptions(*, allowed_origins: List[str], max_age_in_seconds: Optional[int] = None, **kwargs)[source]

Defines options to control Cross-Origin Resource Sharing (CORS) for an index.

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

Variables
  • allowed_origins (list[str]) – Required. 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).

  • max_age_in_seconds (long) – The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

Keyword Arguments
  • allowed_origins (list[str]) – Required. 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).

  • max_age_in_seconds (long) – The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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.

Keyword Arguments
  • 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.

  • name – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CustomEntityLookupSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.CustomEntityLookupSkillLanguage]] = None, entities_definition_uri: Optional[str] = None, inline_entities_definition: Optional[List[azure.search.documents.indexes._generated.models._models_py3.CustomEntity]] = None, global_default_case_sensitive: Optional[bool] = None, global_default_accent_sensitive: Optional[bool] = None, global_default_fuzzy_edit_distance: Optional[int] = None, **kwargs)[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 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 CustomEntityLookupSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, “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]) – 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 CustomEntityLookupSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, “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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage(value)[source]

The language codes supported for input text by CustomEntityLookupSkill.

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.CustomNormalizer(*, name: str, token_filters: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TokenFilterName]]] = None, char_filters: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.CharFilterName]]] = None, **kwargs)[source]

Allows you to configure normalization for filterable, sortable, and facetable fields, which by default operate with strict matching. This is a user-defined configuration consisting of at least one or more filters, which modify the token that is stored.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the normalizer.Constant filled by server.

  • name (str) – Required. The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in ‘.microsoft’ nor ‘.lucene’, nor be named ‘asciifolding’, ‘standard’, ‘lowercase’, ‘uppercase’, or ‘elision’.

  • token_filters (list[str or TokenFilterName]) – A list of token filters used to filter out or modify the input token. 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 or CharFilterName]) – A list of character filters used to prepare input text before it is processed. 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) – Required. The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in ‘.microsoft’ nor ‘.lucene’, nor be named ‘asciifolding’, ‘standard’, ‘lowercase’, ‘uppercase’, or ‘elision’.

  • token_filters (list[str or TokenFilterName]) – A list of token filters used to filter out or modify the input token. 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 or CharFilterName]) – A list of character filters used to prepare input text before it is processed. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DefaultCognitiveServicesAccount(*, description: Optional[str] = None, **kwargs)[source]

An empty object that represents the default cognitive service resource for a skillset.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server.

  • description (str) – Description of the cognitive service resource attached to a skillset.

Keyword Arguments

description (str) – Description of the cognitive service resource attached to a skillset.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DictionaryDecompounderTokenFilter(*, name: str, word_list: List[str], min_word_size: Optional[int] = 5, min_subword_size: Optional[int] = 2, max_subword_size: Optional[int] = 15, only_longest_match: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • word_list (list[str]) – Required. The list of words to match against.

  • 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) – Required. 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.

  • word_list (list[str]) – Required. The list of words to match against.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DistanceScoringFunction(*, field_name: str, boost: float, parameters: azure.search.documents.indexes._generated.models._models_py3.DistanceScoringParameters, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)[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 Azure.

Variables
  • type (str) – Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (DistanceScoringParameters) – Required. Parameter values for the distance scoring function.

Keyword Arguments
  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (DistanceScoringParameters) – Required. Parameter values for the distance scoring function.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DistanceScoringParameters(*, reference_point_parameter: str, boosting_distance: float, **kwargs)[source]

Provides parameter values to a distance scoring function.

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

Variables
  • reference_point_parameter (str) – Required. The name of the parameter passed in search queries to specify the reference location.

  • boosting_distance (float) – Required. The distance in kilometers from the reference location where the boosting range ends.

Keyword Arguments
  • reference_point_parameter (str) – Required. The name of the parameter passed in search queries to specify the reference location.

  • boosting_distance (float) – Required. The distance in kilometers from the reference location where the boosting range ends.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DocumentExtractionSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, parsing_mode: Optional[str] = None, data_to_extract: Optional[str] = None, configuration: Optional[Dict[str, Any]] = None, **kwargs)[source]

A skill that extracts content from a file within the enrichment pipeline.

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.

  • 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]) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.DocumentKeysOrIds(*, document_keys: Optional[List[str]] = None, datasource_document_ids: Optional[List[str]] = None, **kwargs)[source]

DocumentKeysOrIds.

Variables
  • document_keys (list[str]) – document keys to be reset.

  • datasource_document_ids (list[str]) – datasource document identifiers to be reset.

Keyword Arguments
  • document_keys (list[str]) – document keys to be reset.

  • datasource_document_ids (list[str]) – datasource document identifiers to be reset.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.EdgeNGramTokenFilter(*, name: str, min_gram: Optional[int] = 1, max_gram: Optional[int] = 2, side: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.EdgeNGramTokenFilterSide]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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”. Possible values include: “front”, “back”.

Keyword Arguments
  • name (str) – Required. 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.

  • 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”. Possible values include: “front”, “back”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.EdgeNGramTokenFilterSide(value)[source]

Specifies which side of the input an n-gram should be generated from.

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: Optional[int] = 1, max_gram: Optional[int] = 2, token_chars: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TokenCharacterKind]]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ElisionTokenFilter(*, name: str, articles: Optional[List[str]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • articles (list[str]) – The set of articles to remove.

Keyword Arguments
  • name (str) – Required. 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.

  • articles (list[str]) – The set of articles to remove.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.EntityCategory(value)[source]

A string indicating what entity categories to return.

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[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[str] = None, minimum_precision: Optional[float] = None, model_version: Optional[str] = None, **kwargs)[source]

Using the Text Analytics API, extracts linked entities 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.

  • 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]) – 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) – 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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.

Keyword Arguments
  • 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.

  • name – 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 – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context – 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 – Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill.

  • outputs – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.EntityRecognitionSkillLanguage(value)[source]

The language codes supported for input text by EntityRecognitionSkill.

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)[source]

Specifies the Entity Recognition skill version to use.

LATEST = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill'

Use latest version of Entity Recognition skill.

V1 = '#Microsoft.Skills.Text.EntityRecognitionSkill'

Use Entity Recognition skill V1.

V3 = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill'

Use Entity Recognition skill V3.

class azure.search.documents.indexes.models.FieldMapping(*, source_field_name: str, target_field_name: Optional[str] = None, mapping_function: Optional[azure.search.documents.indexes._generated.models._models_py3.FieldMappingFunction] = None, **kwargs)[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 Azure.

Variables
  • source_field_name (str) – Required. The name of the field in the data source.

  • 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) – Required. The name of the field in the data source.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.FieldMappingFunction(*, name: str, parameters: Optional[Dict[str, Any]] = None, **kwargs)[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 Azure.

Variables
  • name (str) – Required. The name of the field mapping function.

  • 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) – Required. The name of the field mapping function.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.FreshnessScoringFunction(*, field_name: str, boost: float, parameters: azure.search.documents.indexes._generated.models._models_py3.FreshnessScoringParameters, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)[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 Azure.

Variables
  • type (str) – Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (FreshnessScoringParameters) – Required. Parameter values for the freshness scoring function.

Keyword Arguments
  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (FreshnessScoringParameters) – Required. Parameter values for the freshness scoring function.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.FreshnessScoringParameters(*, boosting_duration: datetime.timedelta, **kwargs)[source]

Provides parameter values to a freshness scoring function.

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

Variables

boosting_duration (timedelta) – Required. The expiration period after which boosting will stop for a particular document.

Keyword Arguments

boosting_duration (timedelta) – Required. The expiration period after which boosting will stop for a particular document.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.GetIndexStatisticsResult(**kwargs)[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 Azure.

Variables
  • document_count (long) – Required. The number of documents in the index.

  • storage_size (long) – Required. The amount of storage in bytes consumed by the index.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ImageAnalysisSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ImageAnalysisSkillLanguage]] = None, visual_features: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.VisualFeature]]] = None, details: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ImageDetail]]] = None, **kwargs)[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 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 ImageAnalysisSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “en”, “es”, “ja”, “pt”, “zh”.

  • 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]) – 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 ImageAnalysisSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “en”, “es”, “ja”, “pt”, “zh”.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ImageAnalysisSkillLanguage(value)[source]

The language codes supported for input by ImageAnalysisSkill.

EN = 'en'

English.

ES = 'es'

Spanish.

JA = 'ja'

Japanese.

PT = 'pt'

Portuguese.

ZH = 'zh'

Chinese.

class azure.search.documents.indexes.models.ImageDetail(value)[source]

A string indicating which domain-specific details to return.

CELEBRITIES = 'celebrities'

Details recognized as celebrities.

LANDMARKS = 'landmarks'

Details recognized as landmarks.

class azure.search.documents.indexes.models.IndexerExecutionStatus(value)[source]

Represents the status of an individual indexer execution.

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)[source]

Represents the overall indexer status.

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: Optional[int] = None, max_failed_items: Optional[int] = 0, max_failed_items_per_batch: Optional[int] = 0, configuration: Optional[azure.search.documents.indexes._generated.models._models_py3.IndexingParametersConfiguration] = None, **kwargs)[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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.IndexingSchedule(*, interval: datetime.timedelta, start_time: Optional[datetime.datetime] = None, **kwargs)[source]

Represents a schedule for indexer execution.

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

Variables
  • interval (timedelta) – Required. The interval of time between indexer executions.

  • start_time (datetime) – The time when an indexer should start running.

Keyword Arguments
  • interval (timedelta) – Required. The interval of time between indexer executions.

  • start_time (datetime) – The time when an indexer should start running.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.InputFieldMappingEntry(*, name: str, source: Optional[str] = None, source_context: Optional[str] = None, inputs: Optional[List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry]] = None, **kwargs)[source]

Input field mapping for a skill.

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

Variables
  • name (str) – Required. The name of the input.

  • 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) – Required. The name of the input.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.KeepTokenFilter(*, name: str, keep_words: List[str], lower_case_keep_words: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • keep_words (list[str]) – Required. The list of words to keep.

  • lower_case_keep_words (bool) – A value indicating whether to lower case all words first. Default is false.

Keyword Arguments
  • name (str) – Required. 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.

  • keep_words (list[str]) – Required. The list of words to keep.

  • lower_case_keep_words (bool) – A value indicating whether to lower case all words first. Default is false.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.KeyPhraseExtractionSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.KeyPhraseExtractionSkillLanguage]] = None, max_key_phrase_count: Optional[int] = None, model_version: Optional[str] = None, **kwargs)[source]

A skill that uses text analytics for key phrase extraction.

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 KeyPhraseExtractionSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “nl”, “en”, “fi”, “fr”, “de”, “it”, “ja”, “ko”, “no”, “pl”, “pt-PT”, “pt-BR”, “ru”, “es”, “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]) – 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 KeyPhraseExtractionSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “nl”, “en”, “fi”, “fr”, “de”, “it”, “ja”, “ko”, “no”, “pl”, “pt-PT”, “pt-BR”, “ru”, “es”, “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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage(value)[source]

The language codes supported for input text by KeyPhraseExtractionSkill.

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: Optional[bool] = False, **kwargs)[source]

Marks terms as keywords. This token filter is implemented using Apache Lucene.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • keywords (list[str]) – Required. A list of words to mark as keywords.

  • 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) – Required. 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.

  • keywords (list[str]) – Required. A list of words to mark as keywords.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.KeywordTokenizer(*, name: str, max_token_length: Optional[int] = 256, **kwargs)[source]
Keyword Arguments
  • 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LanguageDetectionSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_country_hint: Optional[str] = None, model_version: Optional[str] = None, **kwargs)[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 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_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]) – 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_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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LengthTokenFilter(*, name: str, min_length: Optional[int] = 0, max_length: Optional[int] = 300, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LexicalAnalyzer(*, name: str, **kwargs)[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 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.

Keyword Arguments

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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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

Base type for normalizers.

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

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the normalizer.Constant filled by server.

  • name (str) – Required. The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in ‘.microsoft’ nor ‘.lucene’, nor be named ‘asciifolding’, ‘standard’, ‘lowercase’, ‘uppercase’, or ‘elision’.

Keyword Arguments

name (str) – Required. The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in ‘.microsoft’ nor ‘.lucene’, nor be named ‘asciifolding’, ‘standard’, ‘lowercase’, ‘uppercase’, or ‘elision’.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LexicalNormalizerName(value)[source]

Defines the names of all text normalizers supported by Azure Cognitive Search.

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.

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.

LOWERCASE = 'lowercase'

Normalizes token text to lowercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html.

STANDARD = 'standard'

Standard normalizer, which consists of lowercase and asciifolding. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html.

UPPERCASE = 'uppercase'

Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html.

class azure.search.documents.indexes.models.LexicalTokenizer(*, name: str, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

Keyword Arguments

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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LimitTokenFilter(*, name: str, max_token_count: Optional[int] = 1, consume_all_tokens: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LuceneStandardAnalyzer(*, name: str, max_token_length: Optional[int] = 255, stopwords: Optional[List[str]] = None, **kwargs)[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 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.

  • 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) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.LuceneStandardTokenizer(*, name: str, max_token_length: Optional[int] = 255, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split.

Keyword Arguments
  • 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.

  • max_token_length (int) – The maximum token length. Default is 255. Tokens longer than the maximum length are split.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MagnitudeScoringFunction(*, field_name: str, boost: float, parameters: azure.search.documents.indexes._generated.models._models_py3.MagnitudeScoringParameters, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)[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 Azure.

Variables
  • type (str) – Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (MagnitudeScoringParameters) – Required. Parameter values for the magnitude scoring function.

Keyword Arguments
  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (MagnitudeScoringParameters) – Required. Parameter values for the magnitude scoring function.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MagnitudeScoringParameters(*, boosting_range_start: float, boosting_range_end: float, should_boost_beyond_range_by_constant: Optional[bool] = None, **kwargs)[source]

Provides parameter values to a magnitude scoring function.

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

Variables
  • boosting_range_start (float) – Required. The field value at which boosting starts.

  • boosting_range_end (float) – Required. The field value at which boosting ends.

  • 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) – Required. The field value at which boosting starts.

  • boosting_range_end (float) – Required. The field value at which boosting ends.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MappingCharFilter(*, name: str, mappings: List[str], **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the char filter.Constant filled by server.

  • name (str) – Required. 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.

  • mappings (list[str]) – Required. A list of mappings of the following format: “a=>b” (all occurrences of the character “a” will be replaced with character “b”).

Keyword Arguments
  • name (str) – Required. 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.

  • mappings (list[str]) – Required. A list of mappings of the following format: “a=>b” (all occurrences of the character “a” will be replaced with character “b”).

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MergeSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, insert_pre_tag: Optional[str] = ' ', insert_post_tag: Optional[str] = ' ', **kwargs)[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 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.

  • 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]) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MicrosoftLanguageStemmingTokenizer(*, name: str, max_token_length: Optional[int] = 255, is_search_tokenizer: Optional[bool] = False, language: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.MicrosoftStemmingTokenizerLanguage]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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. Possible values include: “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”, “urdu”.

Keyword Arguments
  • 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.

  • 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. Possible values include: “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”, “urdu”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MicrosoftLanguageTokenizer(*, name: str, max_token_length: Optional[int] = 255, is_search_tokenizer: Optional[bool] = False, language: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.MicrosoftTokenizerLanguage]] = None, **kwargs)[source]

Divides text using language-specific rules.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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. Possible values include: “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”, “vietnamese”.

Keyword Arguments
  • 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.

  • 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. Possible values include: “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”, “vietnamese”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage(value)[source]

Lists the languages supported by the Microsoft language stemming tokenizer.

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)[source]

Lists the languages supported by the Microsoft language tokenizer.

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: Optional[int] = 1, max_gram: Optional[int] = 2, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.NGramTokenizer(*, name: str, min_gram: Optional[int] = 1, max_gram: Optional[int] = 2, token_chars: Optional[List[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TokenCharacterKind]]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.OcrSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.OcrSkillLanguage]] = None, should_detect_orientation: Optional[bool] = False, line_ending: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.LineEnding]] = None, **kwargs)[source]

A skill that extracts text from image files.

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 OcrSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “zh-Hans”, “zh-Hant”, “cs”, “da”, “nl”, “en”, “fi”, “fr”, “de”, “el”, “hu”, “it”, “ja”, “ko”, “nb”, “pl”, “pt”, “ru”, “es”, “sv”, “tr”, “ar”, “ro”, “sr-Cyrl”, “sr-Latn”, “sk”, “unk”.

  • should_detect_orientation (bool) – A value indicating to turn orientation detection on or not. Default is false.

  • line_ending (str or LineEnding) – Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is “space”. Possible values include: “space”, “carriageReturn”, “lineFeed”, “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]) – 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 OcrSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “zh-Hans”, “zh-Hant”, “cs”, “da”, “nl”, “en”, “fi”, “fr”, “de”, “el”, “hu”, “it”, “ja”, “ko”, “nb”, “pl”, “pt”, “ru”, “es”, “sv”, “tr”, “ar”, “ro”, “sr-Cyrl”, “sr-Latn”, “sk”, “unk”.

  • should_detect_orientation (bool) – A value indicating to turn orientation detection on or not. Default is false.

  • line_ending (str or LineEnding) – Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is “space”. Possible values include: “space”, “carriageReturn”, “lineFeed”, “carriageReturnLineFeed”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.OcrSkillLanguage(value)[source]

The language codes supported for input by OcrSkill.

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.

NB = 'nb'

Norwegian (Bokmaal).

NL = 'nl'

Dutch.

PL = 'pl'

Polish.

PT = 'pt'

Portuguese.

RO = 'ro'

Romanian.

RU = 'ru'

Russian.

SK = 'sk'

Slovak.

SR_CYRL = 'sr-Cyrl'

Serbian (Cyrillic, Serbia).

SR_LATN = 'sr-Latn'

Serbian (Latin, Serbia).

SV = 'sv'

Swedish.

TR = 'tr'

Turkish.

UNK = 'unk'

Unknown. If the language is explicitly set to “unk”, the language will be auto-detected.

ZH_HANS = 'zh-Hans'

Chinese-Simplified.

ZH_HANT = 'zh-Hant'

Chinese-Traditional.

class azure.search.documents.indexes.models.OutputFieldMappingEntry(*, name: str, target_name: Optional[str] = None, **kwargs)[source]

Output field mapping for a skill.

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

Variables
  • name (str) – Required. The name of the output defined by the skill.

  • target_name (str) – The target name of the output. It is optional and default to name.

Keyword Arguments
  • name (str) – Required. The name of the output defined by the skill.

  • target_name (str) – The target name of the output. It is optional and default to name.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PIIDetectionSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[str] = None, minimum_precision: Optional[float] = None, masking_mode: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.PIIDetectionSkillMaskingMode]] = None, masking_character: Optional[str] = None, model_version: Optional[str] = None, pii_categories: Optional[List[str]] = None, domain: Optional[str] = None, **kwargs)[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 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) – 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’. Possible values include: “none”, “replace”.

  • masking_character (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]) – 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) – 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’. Possible values include: “none”, “replace”.

  • masking_character (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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode(value)[source]

A string indicating what maskingMode to use to mask the personal information detected in the input text.

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: Optional[str] = '/', replacement: Optional[str] = '/', max_token_length: Optional[int] = 300, reverse_token_order: Optional[bool] = False, number_of_tokens_to_skip: Optional[int] = 0, **kwargs)[source]
Keyword Arguments
  • 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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.

Keyword Arguments
  • 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.

  • name – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PatternCaptureTokenFilter(*, name: str, patterns: List[str], preserve_original: Optional[bool] = True, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • patterns (list[str]) – Required. A list of patterns to match against each token.

  • 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) – Required. 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.

  • patterns (list[str]) – Required. A list of patterns to match against each token.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PatternReplaceCharFilter(*, name: str, pattern: str, replacement: str, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the char filter.Constant filled by server.

  • name (str) – Required. 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.

  • pattern (str) – Required. A regular expression pattern.

  • replacement (str) – Required. The replacement text.

Keyword Arguments
  • name (str) – Required. 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.

  • pattern (str) – Required. A regular expression pattern.

  • replacement (str) – Required. The replacement text.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PatternReplaceTokenFilter(*, name: str, pattern: str, replacement: str, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • pattern (str) – Required. A regular expression pattern.

  • replacement (str) – Required. The replacement text.

Keyword Arguments
  • name (str) – Required. 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.

  • pattern (str) – Required. A regular expression pattern.

  • replacement (str) – Required. The replacement text.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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.

Keyword Arguments
  • 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.

  • name – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PhoneticEncoder(value)[source]

Identifies the type of phonetic encoder to use with a PhoneticTokenFilter.

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: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.PhoneticEncoder]] = None, replace_original_tokens: Optional[bool] = True, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • encoder (str or PhoneticEncoder) – The phonetic encoder to use. Default is “metaphone”. Possible values include: “metaphone”, “doubleMetaphone”, “soundex”, “refinedSoundex”, “caverphone1”, “caverphone2”, “cologne”, “nysiis”, “koelnerPhonetik”, “haasePhonetik”, “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) – Required. 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.

  • encoder (str or PhoneticEncoder) – The phonetic encoder to use. Default is “metaphone”. Possible values include: “metaphone”, “doubleMetaphone”, “soundex”, “refinedSoundex”, “caverphone1”, “caverphone2”, “cologne”, “nysiis”, “koelnerPhonetik”, “haasePhonetik”, “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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.PrioritizedFields(*, title_field: Optional[azure.search.documents.indexes._generated.models._models_py3.SemanticField] = None, prioritized_content_fields: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SemanticField]] = None, prioritized_keywords_fields: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SemanticField]] = None, **kwargs)[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.

  • prioritized_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.

  • prioritized_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.

  • prioritized_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.

  • prioritized_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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.RegexFlags(value)[source]

Defines flags that can be combined to control how regular expressions are used in the pattern analyzer and pattern tokenizer.

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.ScoringFunction(*, field_name: str, boost: float, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)[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 Azure.

Variables
  • type (str) – Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

Keyword Arguments
  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ScoringFunctionAggregation(value)[source]

Defines the aggregation function used to combine the results of all the scoring functions in a scoring profile.

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)[source]

Defines the function used to interpolate score boosting across a range of documents.

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: Optional[azure.search.documents.indexes._generated.models._models_py3.TextWeights] = None, functions: Optional[List[azure.search.documents.indexes._generated.models._models_py3.ScoringFunction]] = None, function_aggregation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionAggregation]] = None, **kwargs)[source]

Defines parameters for a search index that influence scoring in search queries.

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

Variables
  • name (str) – Required. The name of the scoring profile.

  • 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. Possible values include: “sum”, “average”, “minimum”, “maximum”, “firstMatching”.

Keyword Arguments
  • name (str) – Required. The name of the scoring profile.

  • 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. Possible values include: “sum”, “average”, “minimum”, “maximum”, “firstMatching”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchAlias(*, name: str, indexes: List[str], e_tag: Optional[str] = None, **kwargs)[source]

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

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

Variables
  • name (str) – Required. The name of the alias.

  • indexes (list[str]) – Required. The name of the index this alias maps to. Only one index name may be specified.

  • e_tag (str) – The ETag of the alias.

Keyword Arguments
  • name (str) – Required. The name of the alias.

  • indexes (list[str]) – Required. The name of the index this alias maps to. Only one index name may be specified.

  • e_tag (str) – The ETag of the alias.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchField(**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.

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 or SearchFieldDataType) – Required. The data type of the field. Possible values include: “Edm.String”, “Edm.Int32”, “Edm.Int64”, “Edm.Double”, “Edm.Boolean”, “Edm.DateTimeOffset”, “Edm.GeographyPoint”, “Edm.ComplexType”.

  • 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.

  • 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, and it must be null for complex fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is False for simple fields and null for complex 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. 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. 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. 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. 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. 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”.

  • normalizer_name (str or LexicalNormalizerName) – The name of the normalizer to use for the field. This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. Must be null for complex fields. Possible values include: “asciifolding”, “elision”, “lowercase”, “standard”, “uppercase”.

  • 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndex(**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.

Keyword Arguments
  • 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.

  • normalizers (list[LexicalNormalizer]) – The normalizers 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_settings (SemanticSettings) – Defines parameters for a search index that influence semantic capabilities.

  • e_tag (str) – The ETag of the index.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexer(*, name: str, data_source_name: str, target_index_name: str, description: Optional[str] = None, skillset_name: Optional[str] = None, schedule: Optional[azure.search.documents.indexes._generated.models._models_py3.IndexingSchedule] = None, parameters: Optional[azure.search.documents.indexes._generated.models._models_py3.IndexingParameters] = None, field_mappings: Optional[List[azure.search.documents.indexes._generated.models._models_py3.FieldMapping]] = None, output_field_mappings: Optional[List[azure.search.documents.indexes._generated.models._models_py3.FieldMapping]] = None, is_disabled: Optional[bool] = False, e_tag: Optional[str] = None, encryption_key: Optional[azure.search.documents.indexes._generated.models._models_py3.SearchResourceEncryptionKey] = None, cache: Optional[azure.search.documents.indexes._generated.models._models_py3.SearchIndexerCache] = None, **kwargs)[source]

Represents an indexer.

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

Variables
  • name (str) – Required. The name of the indexer.

  • description (str) – The description of the indexer.

  • data_source_name (str) – Required. The name of the datasource from which this indexer reads data.

  • skillset_name (str) – The name of the skillset executing with this indexer.

  • target_index_name (str) – Required. The name of the index to which this indexer writes data.

  • 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 in Azure Cognitive Search. Once you have encrypted your indexer 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 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.

  • cache (SearchIndexerCache) – Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time.

Keyword Arguments
  • name (str) – Required. The name of the indexer.

  • description (str) – The description of the indexer.

  • data_source_name (str) – Required. The name of the datasource from which this indexer reads data.

  • skillset_name (str) – The name of the skillset executing with this indexer.

  • target_index_name (str) – Required. The name of the index to which this indexer writes data.

  • 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 in Azure Cognitive Search. Once you have encrypted your indexer 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 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.

  • cache (SearchIndexerCache) – Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerCache(*, storage_connection_string: Optional[str] = None, enable_reprocessing: Optional[bool] = None, **kwargs)[source]

SearchIndexerCache.

Variables
  • storage_connection_string (str) – The connection string to the storage account where the cache data will be persisted.

  • enable_reprocessing (bool) – Specifies whether incremental reprocessing is enabled.

Keyword Arguments
  • storage_connection_string (str) – The connection string to the storage account where the cache data will be persisted.

  • enable_reprocessing (bool) – Specifies whether incremental reprocessing is enabled.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerDataContainer(*, name: str, query: Optional[str] = None, **kwargs)[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 Azure.

Variables
  • name (str) – Required. The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed.

  • 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) – Required. The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerDataIdentity(**kwargs)[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 Azure.

Variables

odata_type (str) – Required. Identifies the concrete type of the identity.Constant filled by server.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerDataNoneIdentity(**kwargs)[source]

Clears the identity property of a datasource.

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

Variables

odata_type (str) – Required. Identifies the concrete type of the identity.Constant filled by server.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerDataSourceConnection(**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.

Keyword Arguments
  • 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.

  • identity (SearchIndexerDataIdentity) – An explicit managed identity to use for this datasource. If not specified and the connection string is a managed identity, the system-assigned managed identity is used. If not specified, the value remains unchanged. If “none” is specified, the value of this property is cleared.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerDataSourceType(value)[source]

Defines the type of a datasource.

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(*, user_assigned_identity: str, **kwargs)[source]

Specifies the identity for a datasource to use.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the identity.Constant filled by server.

  • user_assigned_identity (str) – Required. 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” that should have been assigned to the search service.

Keyword Arguments

user_assigned_identity (str) – Required. 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” that should have been assigned to the search service.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerError(**kwargs)[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 Azure.

Variables
  • key (str) – The key of the item for which indexing failed.

  • error_message (str) – Required. The message describing the error that occurred while processing the item.

  • status_code (int) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStore(*, storage_connection_string: str, projections: List[azure.search.documents.indexes._generated.models._models_py3.SearchIndexerKnowledgeStoreProjection], **kwargs)[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 Azure.

Variables
  • storage_connection_string (str) – Required. The connection string to the storage account projections will be stored in.

  • projections (list[SearchIndexerKnowledgeStoreProjection]) – Required. A list of additional projections to perform during indexing.

Keyword Arguments
  • storage_connection_string (str) – Required. The connection string to the storage account projections will be stored in.

  • projections (list[SearchIndexerKnowledgeStoreProjection]) – Required. A list of additional projections to perform during indexing.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector(*, storage_container: str, reference_key_name: Optional[str] = None, generated_key_name: Optional[str] = None, source: Optional[str] = None, source_context: Optional[str] = None, inputs: Optional[List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry]] = None, **kwargs)[source]

Projection definition for what data to store in Azure Files.

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

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) – Required. Blob container to store projections in.

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) – Required. Blob container to store projections in.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector(*, storage_container: str, reference_key_name: Optional[str] = None, generated_key_name: Optional[str] = None, source: Optional[str] = None, source_context: Optional[str] = None, inputs: Optional[List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry]] = None, **kwargs)[source]

Projection definition for what data to store in Azure Blob.

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

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) – Required. Blob container to store projections in.

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) – Required. Blob container to store projections in.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection(*, tables: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SearchIndexerKnowledgeStoreTableProjectionSelector]] = None, objects: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SearchIndexerKnowledgeStoreObjectProjectionSelector]] = None, files: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SearchIndexerKnowledgeStoreFileProjectionSelector]] = None, **kwargs)[source]

Container object for various projection selectors.

Variables
Keyword Arguments
as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector(*, table_name: str, reference_key_name: Optional[str] = None, generated_key_name: Optional[str] = None, source: Optional[str] = None, source_context: Optional[str] = None, inputs: Optional[List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry]] = None, **kwargs)[source]

Description for what data to store in Azure Tables.

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

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) – Required. Name of the Azure table to store projected data in.

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) – Required. Name of the Azure table to store projected data in.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerLimits(**kwargs)[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 (long) – The maximum size of a document, in bytes, which will be considered valid for indexing.

  • max_document_content_characters_to_extract (long) – The maximum number of characters that will be extracted from a document picked up for indexing.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerSkillset(**kwargs)[source]

A list of skills.

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

Keyword Arguments
  • name (str) – Required. The name of the skillset.

  • description (str) – The description of the skillset.

  • skills (list[SearchIndexerSkill]) – Required. A list of skills in the skillset.

  • cognitive_services_account (CognitiveServicesAccount) – Details about cognitive services to be used when running skills.

  • knowledge_store (SearchIndexerKnowledgeStore) – Definition of additional projections to azure blob, table, or files, of enriched data.

  • 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 in Azure Cognitive Search. Once you have encrypted your skillset 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 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.

  • name – Required. The name of the skillset.

  • description – The description of the skillset.

  • skills – Required. A list of skills in the skillset.

  • cognitive_services_account – Details about cognitive services to be used when running skills.

  • knowledge_store – Definition of additional projections to azure blob, table, or files, of enriched data.

  • e_tag – The ETag of the skillset.

  • encryption_key – 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 in Azure Cognitive Search. Once you have encrypted your skillset 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 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchIndexerStatus(**kwargs)[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 Azure.

Variables
  • status (str or IndexerStatus) – Required. Overall indexer status. Possible values include: “unknown”, “error”, “running”.

  • last_result (IndexerExecutionResult) – The result of the most recent or an in-progress indexer execution.

  • execution_history (list[IndexerExecutionResult]) – Required. History of the recent indexer executions, sorted in reverse chronological order.

  • limits (SearchIndexerLimits) – Required. The execution limits for the indexer.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchResourceEncryptionKey(**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.

Keyword Arguments
  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SearchSuggester(*, name: str, source_fields: List[str], **kwargs)[source]
Keyword Arguments
  • name (str) – Required. The name of the suggester.

  • source_fields (list[str]) – Required. The list of field names to which the suggester applies. Each field must be searchable.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

search_mode = 'analyzingInfixMatching'
class azure.search.documents.indexes.models.SemanticConfiguration(*, name: str, prioritized_fields: azure.search.documents.indexes._generated.models._models_py3.PrioritizedFields, **kwargs)[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 Azure.

Variables
  • name (str) – Required. The name of the semantic configuration.

  • prioritized_fields (PrioritizedFields) – Required. 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.

Keyword Arguments
  • name (str) – Required. The name of the semantic configuration.

  • prioritized_fields (PrioritizedFields) – Required. 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SemanticField(*, field_name: Optional[str] = None, **kwargs)[source]

A field that is used as part of the semantic configuration.

Variables

field_name (str) –

Keyword Arguments

field_name (str) –

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SemanticSettings(*, configurations: Optional[List[azure.search.documents.indexes._generated.models._models_py3.SemanticConfiguration]] = None, **kwargs)[source]

Defines parameters for a search index that influence semantic capabilities.

Variables

configurations (list[SemanticConfiguration]) – The semantic configurations for the index.

Keyword Arguments

configurations (list[SemanticConfiguration]) – The semantic configurations for the index.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

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.

Keyword Arguments
  • 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.

  • name – 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 – The description of the skill which describes the inputs, outputs, and usage of the skill.

  • context – 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 – Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill.

  • outputs – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SentimentSkillLanguage(value)[source]

The language codes supported for input text by SentimentSkill.

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)[source]

Specifies the Sentiment Skill version to use.

LATEST = '#Microsoft.Skills.Text.V3.SentimentSkill'

Use latest version of Sentiment skill.

V1 = '#Microsoft.Skills.Text.SentimentSkill'

Use Sentiment skill V1.

V3 = '#Microsoft.Skills.Text.V3.SentimentSkill'

Use Sentiment skill V3.

class azure.search.documents.indexes.models.ShaperSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, **kwargs)[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 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.

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]) – 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.ShingleTokenFilter(*, name: str, max_shingle_size: Optional[int] = 2, min_shingle_size: Optional[int] = 2, output_unigrams: Optional[bool] = True, output_unigrams_if_no_shingles: Optional[bool] = False, token_separator: Optional[str] = ' ', filter_token: Optional[str] = '_', **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SimilarityAlgorithm(**kwargs)[source]
as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SnowballTokenFilter(*, name: str, language: Union[str, azure.search.documents.indexes._generated.models._search_client_enums.SnowballTokenFilterLanguage], **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • language (str or SnowballTokenFilterLanguage) – Required. The language to use. Possible values include: “armenian”, “basque”, “catalan”, “danish”, “dutch”, “english”, “finnish”, “french”, “german”, “german2”, “hungarian”, “italian”, “kp”, “lovins”, “norwegian”, “porter”, “portuguese”, “romanian”, “russian”, “spanish”, “swedish”, “turkish”.

Keyword Arguments
  • name (str) – Required. 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.

  • language (str or SnowballTokenFilterLanguage) – Required. The language to use. Possible values include: “armenian”, “basque”, “catalan”, “danish”, “dutch”, “english”, “finnish”, “french”, “german”, “german2”, “hungarian”, “italian”, “kp”, “lovins”, “norwegian”, “porter”, “portuguese”, “romanian”, “russian”, “spanish”, “swedish”, “turkish”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SnowballTokenFilterLanguage(value)[source]

The language to use for a Snowball token filter.

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: Optional[str] = None, soft_delete_marker_value: Optional[str] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SplitSkill(*, inputs: List[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.SplitSkillLanguage]] = None, text_split_mode: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TextSplitMode]] = None, maximum_page_length: Optional[int] = None, **kwargs)[source]

A skill to split a string into chunks of 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.

  • default_language_code (str or SplitSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, “pt”.

  • text_split_mode (str or TextSplitMode) – A value indicating which split mode to perform. Possible values include: “pages”, “sentences”.

  • maximum_page_length (int) – The desired maximum page length. Default is 10000.

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]) – 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 SplitSkillLanguage) – A value indicating which language code to use. Default is en. Possible values include: “da”, “de”, “en”, “es”, “fi”, “fr”, “it”, “ko”, “pt”.

  • text_split_mode (str or TextSplitMode) – A value indicating which split mode to perform. Possible values include: “pages”, “sentences”.

  • maximum_page_length (int) – The desired maximum page length. Default is 10000.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SplitSkillLanguage(value)[source]

The language codes supported for input text by SplitSkill.

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.SqlIntegratedChangeTrackingPolicy(**kwargs)[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 Azure.

Variables

odata_type (str) – Required. Identifies the concrete type of the data change detection policy.Constant filled by server.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.StemmerOverrideTokenFilter(*, name: str, rules: List[str], **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • rules (list[str]) – Required. A list of stemming rules in the following format: “word => stem”, for example: “ran => run”.

Keyword Arguments
  • name (str) – Required. 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.

  • rules (list[str]) – Required. A list of stemming rules in the following format: “word => stem”, for example: “ran => run”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.StemmerTokenFilter(*, name: str, language: Union[str, azure.search.documents.indexes._generated.models._search_client_enums.StemmerTokenFilterLanguage], **kwargs)[source]

Language specific stemming filter. This token filter is implemented using Apache Lucene.

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

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • language (str or StemmerTokenFilterLanguage) – Required. The language to use. Possible values include: “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”, “turkish”.

Keyword Arguments
  • name (str) – Required. 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.

  • language (str or StemmerTokenFilterLanguage) – Required. The language to use. Possible values include: “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”, “turkish”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.StemmerTokenFilterLanguage(value)[source]

The language to use for a stemmer token filter.

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: Optional[List[str]] = None, **kwargs)[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 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.

  • stopwords (list[str]) – A list of stopwords.

Keyword Arguments
  • 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.

  • stopwords (list[str]) – A list of stopwords.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.StopwordsList(value)[source]

Identifies a predefined list of language-specific stopwords.

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: Optional[List[str]] = None, stopwords_list: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.StopwordsList]] = None, ignore_case: Optional[bool] = False, remove_trailing_stop_words: Optional[bool] = True, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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. Possible values include: “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”, “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) – Required. 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.

  • 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. Possible values include: “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”, “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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SuggestOptions(*, filter: Optional[str] = None, use_fuzzy_matching: Optional[bool] = None, highlight_post_tag: Optional[str] = None, highlight_pre_tag: Optional[str] = None, minimum_coverage: Optional[float] = None, order_by: Optional[List[str]] = None, search_fields: Optional[List[str]] = None, select: Optional[List[str]] = None, top: Optional[int] = None, **kwargs)[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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.SynonymMap(**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.

Keyword Arguments
  • name (str) – Required. The name of the synonym map.

  • 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.

Variables

format (str) – Required. The format of the synonym map. Only the ‘solr’ format is currently supported. Default value: “solr”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

format = 'solr'
class azure.search.documents.indexes.models.SynonymTokenFilter(*, name: str, synonyms: List[str], ignore_case: Optional[bool] = False, expand: Optional[bool] = True, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • synonyms (list[str]) – Required. 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.

  • 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) – Required. 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.

  • synonyms (list[str]) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TagScoringFunction(*, field_name: str, boost: float, parameters: azure.search.documents.indexes._generated.models._models_py3.TagScoringParameters, interpolation: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.ScoringFunctionInterpolation]] = None, **kwargs)[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 Azure.

Variables
  • type (str) – Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server.

  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (TagScoringParameters) – Required. Parameter values for the tag scoring function.

Keyword Arguments
  • field_name (str) – Required. The name of the field used as input to the scoring function.

  • boost (float) – Required. A multiplier for the raw score. Must be a positive number not equal to 1.0.

  • interpolation (str or ScoringFunctionInterpolation) – A value indicating how boosting will be interpolated across document scores; defaults to “Linear”. Possible values include: “linear”, “constant”, “quadratic”, “logarithmic”.

  • parameters (TagScoringParameters) – Required. Parameter values for the tag scoring function.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TagScoringParameters(*, tags_parameter: str, **kwargs)[source]

Provides parameter values to a tag scoring function.

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

Variables

tags_parameter (str) – Required. The name of the parameter passed in search queries to specify the list of tags to compare against the target field.

Keyword Arguments

tags_parameter (str) – Required. The name of the parameter passed in search queries to specify the list of tags to compare against the target field.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TextSplitMode(value)[source]

A value indicating which split mode to perform.

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[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], default_to_language_code: Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TextTranslationSkillLanguage], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_from_language_code: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TextTranslationSkillLanguage]] = None, suggested_from: Optional[Union[str, azure.search.documents.indexes._generated.models._search_client_enums.TextTranslationSkillLanguage]] = None, **kwargs)[source]

A skill to translate text from one language to another.

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_to_language_code (str or TextTranslationSkillLanguage) – Required. The language code to translate documents into for documents that don’t specify the to language explicitly. Possible values include: “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”.

  • default_from_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents from for documents that don’t specify the from language explicitly. Possible values include: “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”.

  • 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. Possible values include: “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”.

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]) – 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_to_language_code (str or TextTranslationSkillLanguage) – Required. The language code to translate documents into for documents that don’t specify the to language explicitly. Possible values include: “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”.

  • default_from_language_code (str or TextTranslationSkillLanguage) – The language code to translate documents from for documents that don’t specify the from language explicitly. Possible values include: “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”.

  • 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. Possible values include: “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”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TextTranslationSkillLanguage(value)[source]

The language codes supported for input text by TextTranslationSkill.

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_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)[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 Azure.

Variables

weights (dict[str, float]) – Required. The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field.

Keyword Arguments

weights (dict[str, float]) – Required. The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TokenCharacterKind(value)[source]

Represents classes of characters on which a token filter can operate.

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)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

Keyword Arguments

name (str) – Required. 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.TokenFilterName(value)[source]

Defines the names of all token filters supported by Azure Cognitive Search.

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://docs.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: Optional[int] = 300, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • length (int) – The length at which terms will be truncated. Default and maximum is 300.

Keyword Arguments
  • name (str) – Required. 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.

  • length (int) – The length at which terms will be truncated. Default and maximum is 300.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.UaxUrlEmailTokenizer(*, name: str, max_token_length: Optional[int] = 255, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the tokenizer.Constant filled by server.

  • 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.

  • 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) – 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.UniqueTokenFilter(*, name: str, only_on_same_position: Optional[bool] = False, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • only_on_same_position (bool) – A value indicating whether to remove duplicates only at the same position. Default is false.

Keyword Arguments
  • name (str) – Required. 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.

  • only_on_same_position (bool) – A value indicating whether to remove duplicates only at the same position. Default is false.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.VisualFeature(value)[source]

The strings indicating what visual feature types to return.

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[azure.search.documents.indexes._generated.models._models_py3.InputFieldMappingEntry], outputs: List[azure.search.documents.indexes._generated.models._models_py3.OutputFieldMappingEntry], uri: str, name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, http_headers: Optional[Dict[str, str]] = None, http_method: Optional[str] = None, timeout: Optional[datetime.timedelta] = None, batch_size: Optional[int] = None, degree_of_parallelism: Optional[int] = None, **kwargs)[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 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.

  • uri (str) – Required. The url for the Web API.

  • 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.

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]) – 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.

  • uri (str) – Required. The url for the Web API.

  • 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.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.search.documents.indexes.models.WordDelimiterTokenFilter(*, name: str, generate_word_parts: Optional[bool] = True, generate_number_parts: Optional[bool] = True, catenate_words: Optional[bool] = False, catenate_numbers: Optional[bool] = False, catenate_all: Optional[bool] = False, split_on_case_change: Optional[bool] = True, preserve_original: Optional[bool] = False, split_on_numerics: Optional[bool] = True, stem_english_possessive: Optional[bool] = True, protected_words: Optional[List[str]] = None, **kwargs)[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 Azure.

Variables
  • odata_type (str) – Required. Identifies the concrete type of the token filter.Constant filled by server.

  • name (str) – Required. 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.

  • 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) – Required. 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.

  • 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=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify 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, content_type=None)

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()
classmethod from_dict(data, key_extractors=None, content_type=None)

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()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure 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

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

azure.search.documents.indexes.models.ComplexField(**kw: Any)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[Field]) – A list of sub-fields

azure.search.documents.indexes.models.SearchableField(**kw: Any)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 true 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 AnalyzerName) – 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 AnalyzerName) – 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 AnalyzerName) – 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.

azure.search.documents.indexes.models.SimpleField(**kw: Any)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 – 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. :paramtype type: str

  • 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.