Class MappingCharFilter

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

public final class MappingCharFilter extends CharFilter
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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MappingCharFilter(String name, List<String> mappings)
    Creates an instance of MappingCharFilter class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of MappingCharFilter from the JsonReader.
    Get the mappings property: A list of mappings of the following format: "a=>b" (all occurrences of the character "a" will be replaced with character "b").
    Get the odataType property: A URI fragment specifying the type of char filter.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class com.azure.search.documents.indexes.models.CharFilter

    getName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • MappingCharFilter

      public MappingCharFilter(String name, List<String> mappings)
      Creates an instance of MappingCharFilter class.
      Parameters:
      name - the name value to set.
      mappings - the mappings value to set.
  • Method Details

    • getOdataType

      public String getOdataType()
      Get the odataType property: A URI fragment specifying the type of char filter.
      Overrides:
      getOdataType in class CharFilter
      Returns:
      the odataType value.
    • getMappings

      public List<String> getMappings()
      Get the mappings property: A list of mappings of the following format: "a=>b" (all occurrences of the character "a" will be replaced with character "b").
      Returns:
      the mappings value.
    • toJson

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

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