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>

public final class SplitSkill extends SearchIndexerSkill
A skill to split a string into chunks of text.
  • Constructor Details

  • Method Details

    • getOdataType

      public String getOdataType()
      Get the odataType property: A URI fragment specifying the type of skill.
      Overrides:
      getOdataType in class SearchIndexerSkill
      Returns:
      the odataType value.
    • getDefaultLanguageCode

      public SplitSkillLanguage getDefaultLanguageCode()
      Get the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.
      Returns:
      the defaultLanguageCode value.
    • setDefaultLanguageCode

      public SplitSkill setDefaultLanguageCode(SplitSkillLanguage defaultLanguageCode)
      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

      public TextSplitMode getTextSplitMode()
      Get the textSplitMode property: A value indicating which split mode to perform.
      Returns:
      the textSplitMode value.
    • setTextSplitMode

      public SplitSkill setTextSplitMode(TextSplitMode textSplitMode)
      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

      public Integer getMaximumPageLength()
      Get the maximumPageLength property: The desired maximum page length. Default is 10000.
      Returns:
      the maximumPageLength value.
    • setMaximumPageLength

      public SplitSkill setMaximumPageLength(Integer maximumPageLength)
      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

      public Integer 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

      public SplitSkill setPageOverlapLength(Integer pageOverlapLength)
      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

      public Integer 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

      public SplitSkill setMaximumPagesToTake(Integer maximumPagesToTake)
      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

      public SplitSkillUnit 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

      public SplitSkill setUnit(SplitSkillUnit unit)
      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

      public AzureOpenAITokenizerParameters 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

      public SplitSkill setName(String name)
      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:
      setName in class SearchIndexerSkill
      Parameters:
      name - the name value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • setDescription

      public SplitSkill setDescription(String description)
      Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.
      Overrides:
      setDescription in class SearchIndexerSkill
      Parameters:
      description - the description value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • setContext

      public SplitSkill 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). The default is /document.
      Overrides:
      setContext in class SearchIndexerSkill
      Parameters:
      context - the context value to set.
      Returns:
      the SearchIndexerSkill object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SearchIndexerSkill>
      Overrides:
      toJson in class SearchIndexerSkill
      Throws:
      IOException
    • fromJson

      public static SplitSkill fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.