Class SplitSkill
java.lang.Object
com.azure.search.documents.indexes.models.SearchIndexerSkill
com.azure.search.documents.indexes.models.SplitSkill
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchIndexerSkill>
A skill to split a string into chunks of text.
-
Constructor Summary
ConstructorsConstructorDescriptionSplitSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs) Creates an instance of SplitSkill class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SplitSkillfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SplitSkill from the JsonReader.Get the azureOpenAITokenizerParameters property: Only applies if the unit is set to azureOpenAITokens.Get the defaultLanguageCode property: A value indicating which language code to use.Get the maximumPageLength property: The desired maximum page length.Get the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'.Get the odataType property: A URI fragment specifying the type of skill.Get the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'.Get the textSplitMode property: A value indicating which split mode to perform.getUnit()Get the unit property: Only applies if textSplitMode is set to pages.setAzureOpenAITokenizerParameters(AzureOpenAITokenizerParameters azureOpenAITokenizerParameters) Set the azureOpenAITokenizerParameters property: Only applies if the unit is set to azureOpenAITokens.setContext(String context) Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content).setDefaultLanguageCode(SplitSkillLanguage defaultLanguageCode) Set the defaultLanguageCode property: A value indicating which language code to use.setDescription(String description) Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.setMaximumPageLength(Integer maximumPageLength) Set the maximumPageLength property: The desired maximum page length.setMaximumPagesToTake(Integer maximumPagesToTake) Set the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'.Set the name property: The name of the skill which uniquely identifies it within the skillset.setPageOverlapLength(Integer pageOverlapLength) Set the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'.setTextSplitMode(TextSplitMode textSplitMode) Set the textSplitMode property: A value indicating which split mode to perform.setUnit(SplitSkillUnit unit) Set the unit property: Only applies if textSplitMode is set to pages.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.search.documents.indexes.models.SearchIndexerSkill
getContext, getDescription, getInputs, getName, getOutputsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SplitSkill
Creates an instance of SplitSkill class.- Parameters:
inputs- the inputs value to set.outputs- the outputs value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of skill.- Overrides:
getOdataTypein classSearchIndexerSkill- Returns:
- the odataType value.
-
getDefaultLanguageCode
Get the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.- Returns:
- the defaultLanguageCode value.
-
setDefaultLanguageCode
Set the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.- Parameters:
defaultLanguageCode- the defaultLanguageCode value to set.- Returns:
- the SplitSkill object itself.
-
getTextSplitMode
Get the textSplitMode property: A value indicating which split mode to perform.- Returns:
- the textSplitMode value.
-
setTextSplitMode
Set the textSplitMode property: A value indicating which split mode to perform.- Parameters:
textSplitMode- the textSplitMode value to set.- Returns:
- the SplitSkill object itself.
-
getMaximumPageLength
Get the maximumPageLength property: The desired maximum page length. Default is 10000.- Returns:
- the maximumPageLength value.
-
setMaximumPageLength
Set the maximumPageLength property: The desired maximum page length. Default is 10000.- Parameters:
maximumPageLength- the maximumPageLength value to set.- Returns:
- the SplitSkill object itself.
-
getPageOverlapLength
Get the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.- Returns:
- the pageOverlapLength value.
-
setPageOverlapLength
Set the pageOverlapLength property: Only applicable when textSplitMode is set to 'pages'. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk.- Parameters:
pageOverlapLength- the pageOverlapLength value to set.- Returns:
- the SplitSkill object itself.
-
getMaximumPagesToTake
Get the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document.- Returns:
- the maximumPagesToTake value.
-
setMaximumPagesToTake
Set the maximumPagesToTake property: Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document.- Parameters:
maximumPagesToTake- the maximumPagesToTake value to set.- Returns:
- the SplitSkill object itself.
-
getUnit
Get the unit property: Only applies if textSplitMode is set to pages. There are two possible values. The choice of the values will decide the length (maximumPageLength and pageOverlapLength) measurement. The default is 'characters', which means the length will be measured by character.- Returns:
- the unit value.
-
setUnit
Set the unit property: Only applies if textSplitMode is set to pages. There are two possible values. The choice of the values will decide the length (maximumPageLength and pageOverlapLength) measurement. The default is 'characters', which means the length will be measured by character.- Parameters:
unit- the unit value to set.- Returns:
- the SplitSkill object itself.
-
getAzureOpenAITokenizerParameters
Get the azureOpenAITokenizerParameters property: Only applies if the unit is set to azureOpenAITokens. If specified, the splitSkill will use these parameters when performing the tokenization. The parameters are a valid 'encoderModelName' and an optional 'allowedSpecialTokens' property.- Returns:
- the azureOpenAITokenizerParameters value.
-
setAzureOpenAITokenizerParameters
public SplitSkill setAzureOpenAITokenizerParameters(AzureOpenAITokenizerParameters azureOpenAITokenizerParameters) Set the azureOpenAITokenizerParameters property: Only applies if the unit is set to azureOpenAITokens. If specified, the splitSkill will use these parameters when performing the tokenization. The parameters are a valid 'encoderModelName' and an optional 'allowedSpecialTokens' property.- Parameters:
azureOpenAITokenizerParameters- the azureOpenAITokenizerParameters value to set.- Returns:
- the SplitSkill object itself.
-
setName
Set the name property: 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 '#'.- Overrides:
setNamein classSearchIndexerSkill- Parameters:
name- the name value to set.- Returns:
- the SearchIndexerSkill object itself.
-
setDescription
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.- Overrides:
setDescriptionin classSearchIndexerSkill- Parameters:
description- the description value to set.- Returns:
- the SearchIndexerSkill object itself.
-
setContext
Set the context property: 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.- Overrides:
setContextin classSearchIndexerSkill- Parameters:
context- the context value to set.- Returns:
- the SearchIndexerSkill object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SearchIndexerSkill>- Overrides:
toJsonin classSearchIndexerSkill- Throws:
IOException
-
fromJson
Reads an instance of SplitSkill from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SplitSkill if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SplitSkill.
-