Share via


PatternReplaceTokenFilter Class

Definition

A character filter that replaces characters in the input string. It uses a regular expression to identify character sequences to preserve and a replacement pattern to identify characters to replace. For example, given the input text "aa bb aa bb", pattern "(aa)\s+(bb)", and replacement "$1#$2", the result would be "aa#bb aa#bb". This token filter is implemented using Apache Lucene.

public class PatternReplaceTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter
public class PatternReplaceTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter, System.ClientModel.Primitives.IJsonModel<Azure.Search.Documents.Indexes.Models.PatternReplaceTokenFilter>, System.ClientModel.Primitives.IPersistableModel<Azure.Search.Documents.Indexes.Models.PatternReplaceTokenFilter>
type PatternReplaceTokenFilter = class
    inherit TokenFilter
type PatternReplaceTokenFilter = class
    inherit TokenFilter
    interface IJsonModel<PatternReplaceTokenFilter>
    interface IPersistableModel<PatternReplaceTokenFilter>
Public Class PatternReplaceTokenFilter
Inherits TokenFilter
Public Class PatternReplaceTokenFilter
Inherits TokenFilter
Implements IJsonModel(Of PatternReplaceTokenFilter), IPersistableModel(Of PatternReplaceTokenFilter)
Inheritance
PatternReplaceTokenFilter
Implements

Constructors

PatternReplaceTokenFilter(String, String, String)

Initializes a new instance of PatternReplaceTokenFilter.

Properties

Name

The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

(Inherited from TokenFilter)
Pattern

A regular expression pattern.

Replacement

The replacement text.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<PatternReplaceTokenFilter>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<PatternReplaceTokenFilter>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IJsonModel<TokenFilter>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from TokenFilter)
IJsonModel<TokenFilter>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from TokenFilter)
IPersistableModel<PatternReplaceTokenFilter>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<PatternReplaceTokenFilter>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<PatternReplaceTokenFilter>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IPersistableModel<TokenFilter>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from TokenFilter)
IPersistableModel<TokenFilter>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from TokenFilter)
IPersistableModel<TokenFilter>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from TokenFilter)

Applies to