Class StopAnalyzer

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

public final class StopAnalyzer extends LexicalAnalyzer
Divides text at non-letters; Applies the lowercase and stopword token filters. This analyzer is implemented using Apache Lucene.
  • Constructor Details

    • StopAnalyzer

      public StopAnalyzer(String name)
      Creates an instance of StopAnalyzer 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 analyzer.
      Overrides:
      getOdataType in class LexicalAnalyzer
      Returns:
      the odataType value.
    • getStopwords

      public List<String> getStopwords()
      Get the stopwords property: A list of stopwords.
      Returns:
      the stopwords value.
    • setStopwords

      public StopAnalyzer setStopwords(List<String> stopwords)
      Set the stopwords property: A list of stopwords.
      Parameters:
      stopwords - the stopwords value to set.
      Returns:
      the StopAnalyzer 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<LexicalAnalyzer>
      Overrides:
      toJson in class LexicalAnalyzer
      Throws:
      IOException
    • fromJson

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

      public StopAnalyzer setStopwords(String... stopwords)
      Set the stopwords property: A list of stopwords.
      Parameters:
      stopwords - the stopwords value to set.
      Returns:
      the StopAnalyzer object itself.