Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomAnalyzer ctor to set AnalyzerBase.Type #431

Merged
merged 2 commits into from Jan 16, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/Nest/Domain/Analysis/Analyzers/CustomAnalyzer.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Nest
Expand All @@ -9,12 +10,14 @@ namespace Nest
/// </summary>
public class CustomAnalyzer : AnalyzerBase
{
public CustomAnalyzer()
{
this.Type = "custom";
}
public CustomAnalyzer(string type)
{
Type = type;
}

[JsonProperty("tokenizer")]
public CustomAnalyzer() : this("custom") {}

[JsonProperty("tokenizer")]
public string Tokenizer { get; set; }

[JsonProperty("filter")]
Expand Down