-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I'm wondering how to define a StopTokenFilter with predefined language-specific stop words as explained at the docs:
The stopwords parameter accepts either an array of stopwords:
PUT /my_index
{ "settings": { "analysis": { "filter": { "my_stop": { "type": "stop", "stopwords": ["and", "is", "the"] } } } } }or a predefined language-specific list:
PUT /my_index
{ "settings": { "analysis": { "filter": { "my_stop": { "type": "stop", "stopwords": "_english_" } } } }
But our StopTokenFilter class defines only the array version for this parameter:
[JsonProperty("stopwords")]
public IEnumerable<string> Stopwords { get; set; }
Shouldn't we need a optional parameter for the StopTokenFilter class that receives the predefined language name to use? Like this:
public StopTokenFilter(string predefinedStopWords = null) : base("stop")
Metadata
Metadata
Assignees
Labels
No labels