Class GsubProcessorDescriptor<T>
Converts a string field by applying a regular expression and a replacement.
If the field is not a string, the processor will throw an exception.
Inheritance
GsubProcessorDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class GsubProcessorDescriptor<T> : ProcessorDescriptorBase<GsubProcessorDescriptor<T>, IGsubProcessor>, IDescriptor, IGsubProcessor, IProcessor where T : class
Type Parameters
Properties
|
Edit this page
View Source
Name
Declaration
protected override string Name { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
Field(Field)
The field to apply the replacement to
Declaration
public GsubProcessorDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
The field to apply the replacement to
Declaration
public GsubProcessorDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
IgnoreMissing(bool?)
If true
and Field does not exist or is null,
the processor quietly exits without modifying the document. Default is false
Declaration
public GsubProcessorDescriptor<T> IgnoreMissing(bool? ignoreMissing = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreMissing |
|
Returns
|
Edit this page
View Source
Pattern(string)
The pattern to be replaced
Declaration
public GsubProcessorDescriptor<T> Pattern(string pattern)
Parameters
Type |
Name |
Description |
string |
pattern |
|
Returns
|
Edit this page
View Source
Replacement(string)
The string to replace the matching patterns with
Declaration
public GsubProcessorDescriptor<T> Replacement(string replacement)
Parameters
Type |
Name |
Description |
string |
replacement |
|
Returns
|
Edit this page
View Source
TargetField(Field)
The field to assign the converted value to, by default field is updated in-place
Declaration
public GsubProcessorDescriptor<T> TargetField(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
TargetField(Expression<Func<T, object>>)
The field to assign the converted value to, by default field is updated in-place
Declaration
public GsubProcessorDescriptor<T> TargetField(Expression<Func<T, object>> objectPath)
Parameters
Returns
Implements
Extension Methods