Class MicrosoftLanguageTokenizer

java.lang.Object
com.azure.search.documents.indexes.models.LexicalTokenizer
com.azure.search.documents.indexes.models.MicrosoftLanguageTokenizer
All Implemented Interfaces:
com.azure.json.JsonSerializable<LexicalTokenizer>

public final class MicrosoftLanguageTokenizer extends LexicalTokenizer
Divides text using language-specific rules.
  • Constructor Details

    • MicrosoftLanguageTokenizer

      public MicrosoftLanguageTokenizer(String name)
      Creates an instance of MicrosoftLanguageTokenizer class.
      Parameters:
      name - the name value to set.
  • Method Details

    • getOdataType

      public String getOdataType()
      Get the odataType property: A URI fragment specifying the type of tokenizer.
      Overrides:
      getOdataType in class LexicalTokenizer
      Returns:
      the odataType value.
    • getMaxTokenLength

      public Integer getMaxTokenLength()
      Get the maxTokenLength property: 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.
      Returns:
      the maxTokenLength value.
    • setMaxTokenLength

      public MicrosoftLanguageTokenizer setMaxTokenLength(Integer maxTokenLength)
      Set the maxTokenLength property: 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.
      Parameters:
      maxTokenLength - the maxTokenLength value to set.
      Returns:
      the MicrosoftLanguageTokenizer object itself.
    • isSearchTokenizer

      public Boolean isSearchTokenizer()
      Get the isSearchTokenizer property: 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.
      Returns:
      the isSearchTokenizer value.
    • setIsSearchTokenizer

      public MicrosoftLanguageTokenizer setIsSearchTokenizer(Boolean isSearchTokenizer)
      Set the isSearchTokenizer property: 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.
      Parameters:
      isSearchTokenizer - the isSearchTokenizer value to set.
      Returns:
      the MicrosoftLanguageTokenizer object itself.
    • getLanguage

      public MicrosoftTokenizerLanguage getLanguage()
      Get the language property: The language to use. The default is English.
      Returns:
      the language value.
    • setLanguage

      Set the language property: The language to use. The default is English.
      Parameters:
      language - the language value to set.
      Returns:
      the MicrosoftLanguageTokenizer 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<LexicalTokenizer>
      Overrides:
      toJson in class LexicalTokenizer
      Throws:
      IOException
    • fromJson

      public static MicrosoftLanguageTokenizer fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MicrosoftLanguageTokenizer from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MicrosoftLanguageTokenizer 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 MicrosoftLanguageTokenizer.