Skip to content

Commit db8c130

Browse files
committed
Merge languages into StopWords type
1 parent bff8ece commit db8c130

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

specification/_types/analysis/StopWords.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ export enum StopWordLanguage {
6363
* Also accepts an array of stop words.
6464
* @class_serializer: StopWordsFormatter
6565
*/
66-
export type StopWords = string | string[]
66+
export type StopWords = StopWordLanguage | string[]

specification/_types/analysis/analyzers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { IcuAnalyzer } from './icu-plugin'
2323
import { KuromojiAnalyzer } from './kuromoji-plugin'
2424
import { SnowballLanguage } from './languages'
2525
import { NoriDecompoundMode } from './nori-plugin'
26-
import { StopWords, StopWordLanguage } from './StopWords'
26+
import { StopWords } from './StopWords'
2727

2828
export class CustomAnalyzer {
2929
type: 'custom'
@@ -56,7 +56,7 @@ export class FingerprintAnalyzer {
5656
*
5757
* @server_default _none_
5858
*/
59-
stopwords?: StopWordLanguage | string[]
59+
stopwords?: StopWords
6060
/**
6161
* The path to a file containing stop words.
6262
*/
@@ -357,7 +357,7 @@ export class PatternAnalyzer {
357357
*
358358
* @server_default _none_
359359
*/
360-
stopwords?: StopWordLanguage | string[]
360+
stopwords?: StopWords
361361
/**
362362
* The path to a file containing stop words.
363363
*/
@@ -394,7 +394,7 @@ export class StandardAnalyzer {
394394
*
395395
* @server_default _none_
396396
*/
397-
stopwords?: StopWordLanguage | string[]
397+
stopwords?: StopWords
398398
/**
399399
* The path to a file containing stop words.
400400
*/
@@ -411,7 +411,7 @@ export class StopAnalyzer {
411411
*
412412
* @server_default _none_
413413
*/
414-
stopwords?: StopWordLanguage | string[]
414+
stopwords?: StopWords
415415
/**
416416
* The path to a file containing stop words.
417417
*/

specification/_types/analysis/token_filters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
import { SnowballLanguage } from './languages'
3737
import { NoriPartOfSpeechTokenFilter } from './nori-plugin'
3838
import { PhoneticTokenFilter } from './phonetic-plugin'
39-
import { StopWordLanguage } from './StopWords'
39+
import { StopWords } from './StopWords'
4040

4141
export class TokenFilterBase {
4242
version?: VersionString
@@ -129,7 +129,7 @@ export class StopTokenFilter extends TokenFilterBase {
129129
/** If `true`, the last token of a stream is removed if it’s a stop word. Defaults to `true`. */
130130
remove_trailing?: boolean
131131
/** Language value, such as `_arabic_` or `_thai_`. Defaults to `_english_`. */
132-
stopwords?: StopWordLanguage | string[]
132+
stopwords?: StopWords
133133
/** Path to a file that contains a list of stop words to remove.
134134
* This path must be absolute or relative to the `config` location, and the file must be UTF-8 encoded. Each stop word in the file must be separated by a line break. */
135135
stopwords_path?: string

0 commit comments

Comments
 (0)