azure.search.documents.indexes.models package

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.

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

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

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

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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

to_analyze_request()[source]
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.AnalyzeResult(*, tokens: List[AnalyzedTokenInfo], **kwargs)[source]

The result of testing an analyzer on text.

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

Parameters

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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.BM25SimilarityAlgorithm

alias of azure.search.documents.indexes._internal._generated.models._models_py3.BM25Similarity

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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.ClassicSimilarityAlgorithm

alias of azure.search.documents.indexes._internal._generated.models._models_py3.ClassicSimilarity

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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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._internal._generated.models._models_py3.DistanceScoringParameters, interpolation: Union[str, ScoringFunctionInterpolation, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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: Union[str, EdgeNGramTokenFilterSide, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.EdgeNGramTokenizer(*, name: str, min_gram: Optional[int] = 1, max_gram: Optional[int] = 2, token_chars: Optional[List[Union[str, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.EntityCategory[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.EntityRecognitionSkill(*, inputs: List[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, categories: Optional[List[Union[str, EntityCategory]]] = None, default_language_code: Union[str, EntityRecognitionSkillLanguage, None] = None, include_typeless_entities: Optional[bool] = None, minimum_precision: Optional[float] = None, **kwargs)[source]

Text analytics entity recognition.

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

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.FieldMapping(*, source_field_name: str, target_field_name: Optional[str] = None, mapping_function: Optional[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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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, object]] = 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.

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

  • parameters (dict[str, object]) – 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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._internal._generated.models._models_py3.FreshnessScoringParameters, interpolation: Union[str, ScoringFunctionInterpolation, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters

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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Union[str, ImageAnalysisSkillLanguage, None] = None, visual_features: Optional[List[Union[str, VisualFeature]]] = None, details: Optional[List[Union[str, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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[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.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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.IndexingParameters(*, batch_size: Optional[int] = None, max_failed_items: Optional[int] = 0, max_failed_items_per_batch: Optional[int] = 0, configuration: Optional[IndexingParametersConfiguration] = None, **kwargs)[source]

Represents parameters for indexer execution.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.IndexerExecutionStatus[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[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.InputFieldMappingEntry(*, name: str, source: Optional[str] = None, source_context: Optional[str] = None, inputs: Optional[List[InputFieldMappingEntry]] = None, **kwargs)[source]

Input field mapping for a skill.

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

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Union[str, KeyPhraseExtractionSkillLanguage, None] = None, max_key_phrase_count: Optional[int] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.KeywordTokenizer[source]

alias of azure.search.documents.indexes._internal._generated.models._models_py3.KeywordTokenizerV2

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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._internal._generated.models._models_py3.MagnitudeScoringParameters, interpolation: Union[str, ScoringFunctionInterpolation, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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”).

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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: Union[str, MicrosoftStemmingTokenizerLanguage, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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: Union[str, MicrosoftTokenizerLanguage, None] = None, **kwargs)[source]

Divides text using language-specific rules.

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Union[str, OcrSkillLanguage, None] = None, should_detect_orientation: Optional[bool] = False, **kwargs)[source]

A skill that extracts text from image files.

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

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

  • should_detect_orientation (bool) – A value indicating to turn orientation detection on or not. 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.PathHierarchyTokenizer

alias of azure.search.documents.indexes._internal._generated.models._models_py3.PathHierarchyTokenizerV2

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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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: Union[str, PhoneticEncoder, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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: Union[str, ScoringFunctionInterpolation, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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[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[TextWeights] = None, functions: Optional[List[ScoringFunction]] = None, function_aggregation: Union[str, ScoringFunctionAggregation, None] = 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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(*, name: str, fields: List[SearchField], scoring_profiles: Optional[List[ScoringProfile]] = None, default_scoring_profile: Optional[str] = None, cors_options: Optional[CorsOptions] = None, suggesters: Optional[List[Suggester]] = None, analyzers: Optional[List[LexicalAnalyzer]] = None, tokenizers: Optional[List[LexicalTokenizer]] = None, token_filters: Optional[List[TokenFilter]] = None, char_filters: Optional[List[CharFilter]] = None, encryption_key: Optional[SearchResourceEncryptionKey] = None, similarity: Optional[Similarity] = None, e_tag: Optional[str] = None, **kwargs)[source]

Represents a search index definition, which describes the fields and search behavior of an index.

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

Parameters
  • 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[Suggester]) – The suggesters for the index.

  • analyzers (list[LexicalAnalyzer]) – The analyzers for the index.

  • tokenizers (list[LexicalTokenizer]) – The tokenizers for the index.

  • token_filters (list[TokenFilter]) – The token filters for the index.

  • char_filters (list[CharFilter]) – The character filters for the index.

  • encryption_key (SearchResourceEncryptionKey) – A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

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

  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[IndexingSchedule] = None, parameters: Optional[IndexingParameters] = None, field_mappings: Optional[List[FieldMapping]] = None, output_field_mappings: Optional[List[FieldMapping]] = None, is_disabled: Optional[bool] = False, e_tag: Optional[str] = None, **kwargs)[source]

Represents an indexer.

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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(*, name: str, skills: List[SearchIndexerSkill], description: Optional[str] = None, cognitive_services_account: Optional[CognitiveServicesAccount] = None, e_tag: Optional[str] = None, **kwargs)[source]

A list of skills.

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

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

  • e_tag (str) – The ETag of the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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(*, inputs: List[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Union[str, SentimentSkillLanguage, None] = None, **kwargs)[source]

Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero to 1.

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

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.ShaperSkill(*, inputs: List[InputFieldMappingEntry], outputs: List[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • 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 (“_”).

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.SimilarityAlgorithm

alias of azure.search.documents.indexes._internal._generated.models._models_py3.Similarity

class azure.search.documents.indexes.models.SnowballTokenFilter(*, name: str, language: Union[str, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_language_code: Union[str, SplitSkillLanguage, None] = None, text_split_mode: Union[str, TextSplitMode, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

Parameters

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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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, 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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: Union[str, StopwordsList, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.SearchSuggester

alias of azure.search.documents.indexes._internal._generated.models._models_py3.Suggester

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.

Parameters
  • 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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters
  • name (str) – Required. The name of the synonym map.

  • synonyms (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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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._internal._generated.models._models_py3.TagScoringParameters, interpolation: Union[str, ScoringFunctionInterpolation, None] = 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

Parameters

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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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[InputFieldMappingEntry], outputs: List[OutputFieldMappingEntry], default_to_language_code: Union[str, TextTranslationSkillLanguage], name: Optional[str] = None, description: Optional[str] = None, context: Optional[str] = None, default_from_language_code: Union[str, TextTranslationSkillLanguage, None] = None, suggested_from: Union[str, TextTranslationSkillLanguage, None] = 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.

Parameters
  • 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”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”.

  • 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”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”.

  • 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”, “ko”, “lv”, “lt”, “mg”, “ms”, “mt”, “nb”, “fa”, “pl”, “pt”, “otq”, “ro”, “ru”, “sm”, “sr-Cyrl”, “sr-Latn”, “sk”, “sl”, “es”, “sv”, “ty”, “ta”, “te”, “th”, “to”, “tr”, “uk”, “ur”, “vi”, “cy”, “yua”.

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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.

KO = 'ko'

Korean.

LT = 'lt'

Lithuanian.

LV = 'lv'

Latvian.

MG = 'mg'

Malagasy.

MS = 'ms'

Malay.

MT = 'mt'

Maltese.

MWW = 'mww'

Hmong Daw.

NB = 'nb'

Norwegian.

NL = 'nl'

Dutch.

OTQ = 'otq'

Queretaro Otomi.

PL = 'pl'

Polish.

PT = 'pt'

Portuguese.

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.

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.

Parameters

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 optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[source]

Defines the names of all token filters supported by Azure Cognitive Search.

APOSTROPHE = 'apostrophe'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/tr/ApostropheFilter.html.

Type

Strips all characters after an apostrophe (including the apostrophe itself) See http

ARABIC_NORMALIZATION = 'arabic_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ar/ArabicNormalizationFilter.html.

Type

A token filter that applies the Arabic normalizer to normalize the orthography. See http

ASCII_FOLDING = 'asciifolding'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html.

Type

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

CJK_BIGRAM = 'cjk_bigram'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKBigramFilter.html.

Type

Forms bigrams of CJK terms that are generated from the standard tokenizer. See http

CJK_WIDTH = 'cjk_width'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKWidthFilter.html.

Type

Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http

CLASSIC = 'classic'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicFilter.html.

Type

Removes English possessives, and dots from acronyms. See http

COMMON_GRAM = 'common_grams'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/commongrams/CommonGramsFilter.html.

Type

Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. See http

EDGE_N_GRAM = 'edgeNGram_v2'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.html.

Type

Generates n-grams of the given size(s) starting from the front or the back of an input token. See http

ELISION = 'elision'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html.

Type

Removes elisions. For example, “l’avion” (the plane) will be converted to “avion” (plane) See http

GERMAN_NORMALIZATION = 'german_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/de/GermanNormalizationFilter.html.

Type

Normalizes German characters according to the heuristics of the German2 snowball algorithm. See http

HINDI_NORMALIZATION = 'hindi_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/hi/HindiNormalizationFilter.html.

Type

Normalizes text in Hindi to remove some differences in spelling variations. See http

INDIC_NORMALIZATION = 'indic_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/in/IndicNormalizationFilter.html.

Type

Normalizes the Unicode representation of text in Indian languages. See http

KEYWORD_REPEAT = 'keyword_repeat'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/KeywordRepeatFilter.html.

Type

Emits each incoming token twice, once as keyword and once as non-keyword. See http

K_STEM = 'kstem'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/en/KStemFilter.html.

Type

A high-performance kstem filter for English. See http

LENGTH = 'length'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LengthFilter.html.

Type

Removes words that are too long or too short. See http

LIMIT = 'limit'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilter.html.

Type

Limits the number of tokens while indexing. See http

LOWERCASE = 'lowercase'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.htm.

Type

Normalizes token text to lower case. See http

N_GRAM = 'nGram_v2'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilter.html.

Type

Generates n-grams of the given size(s) See http

PERSIAN_NORMALIZATION = 'persian_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/fa/PersianNormalizationFilter.html.

Type

Applies normalization for Persian. See http

PHONETIC = 'phonetic'

//lucene.apache.org/core/4_10_3/analyzers-phonetic/org/apache/lucene/analysis/phonetic/package-tree.html.

Type

Create tokens for phonetic matches. See https

PORTER_STEM = 'porter_stem'

//tartarus.org/~martin/PorterStemmer.

Type

Uses the Porter stemming algorithm to transform the token stream. See http

REVERSE = 'reverse'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html.

Type

Reverses the token string. See http

SCANDINAVIAN_FOLDING_NORMALIZATION = 'scandinavian_folding'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianFoldingFilter.html.

Type

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

SCANDINAVIAN_NORMALIZATION = 'scandinavian_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ScandinavianNormalizationFilter.html.

Type

Normalizes use of the interchangeable Scandinavian characters. See http

SHINGLE = 'shingle'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/shingle/ShingleFilter.html.

Type

Creates combinations of tokens as a single token. See http

SNOWBALL = 'snowball'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/snowball/SnowballFilter.html.

Type

A filter that stems words using a Snowball-generated stemmer. See http

SORANI_NORMALIZATION = 'sorani_normalization'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ckb/SoraniNormalizationFilter.html.

Type

Normalizes the Unicode representation of Sorani text. See http

STEMMER = 'stemmer'

//docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters.

Type

Language specific stemming filter. See https

STOPWORDS = 'stopwords'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html.

Type

Removes stop words from a token stream. See http

TRIM = 'trim'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TrimFilter.html.

Type

Trims leading and trailing whitespace from tokens. See http

TRUNCATE = 'truncate'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilter.html.

Type

Truncates the terms to a specific length. See http

UNIQUE = 'unique'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/RemoveDuplicatesTokenFilter.html.

Type

Filters out tokens with same text as the previous token. See http

UPPERCASE = 'uppercase'

//lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html.

Type

Normalizes token text to upper case. See http

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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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[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[InputFieldMappingEntry], outputs: List[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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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.

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

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

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

Advanced usage might optionaly use a callback as parameter:

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

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

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the 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

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

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

Parameters
  • 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. :type 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.