Skip to content

Commit db8924b

Browse files
author
Daniel Low
committed
1 parent 621f1cb commit db8924b

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Nest
4+
{
5+
/// <summary>
6+
/// A token filter of type delimited_token_filter. Splits tokens into tokens and payload whenever a delimiter character is found.
7+
/// </summary>
8+
public class DelimitedPayloadTokenFilter : TokenFilterBase
9+
{
10+
11+
public DelimitedPayloadTokenFilter()
12+
: base("delimited_payload_filter")
13+
{ }
14+
15+
/// <summary>
16+
/// Character used for splitting the tokens. Default is '|'.
17+
/// </summary>
18+
[JsonProperty("delimiter")]
19+
public char? Delimiter { get; set; }
20+
21+
/// <summary>
22+
/// The type of the payload. 'int' for integer, 'float' for float and 'identity' for characters. Default is 'float.'
23+
/// </summary>
24+
[JsonProperty("encoding")]
25+
public string Encoding { get; set; }
26+
27+
}
28+
}

src/Nest/Nest.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
<Reference Include="System.ServiceModel" />
8989
</ItemGroup>
9090
<ItemGroup>
91+
<Compile Include="Domain\Analysis\TokenFilter\DelimitedPayloadTokenFilter.cs" />
9192
<Compile Include="ConvenienceExtensions\AliasExtensions.cs" />
9293
<Compile Include="ConvenienceExtensions\CountExtensions.cs" />
9394
<Compile Include="ConvenienceExtensions\DeleteExtensions.cs" />
@@ -815,4 +816,4 @@
815816
<Target Name="AfterBuild">
816817
</Target>
817818
-->
818-
</Project>
819+
</Project>

0 commit comments

Comments
 (0)