Skip to content

Commit d617a81

Browse files
authored
Reorg _types/analysis (#448)
* Refactor _types pt.5 * Updated output * Refactor _types pt.6 * Updated output
1 parent 0e134e3 commit d617a81

File tree

117 files changed

+2785
-4843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2785
-4843
lines changed

output/schema/schema.json

Lines changed: 1831 additions & 1831 deletions
Large diffs are not rendered by default.

output/typescript/types.ts

Lines changed: 216 additions & 216 deletions
Large diffs are not rendered by default.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { VersionString } from '@_types/common'
21+
import { integer } from '@_types/Numeric'
22+
import { Language, SnowballLanguage } from './languages'
23+
import { StopWords } from './StopWords'
24+
import { NoriDecompoundMode } from './tokenizers'
25+
26+
export class AnalyzerBase {
27+
type: string
28+
version: VersionString
29+
}
30+
31+
export class CustomAnalyzer extends AnalyzerBase {
32+
char_filter: string[]
33+
filter: string[]
34+
position_increment_gap: integer
35+
position_offset_gap: integer
36+
tokenizer: string
37+
}
38+
39+
export class FingerprintAnalyzer extends AnalyzerBase {
40+
max_output_size: integer
41+
preserve_original: boolean
42+
separator: string
43+
stopwords: StopWords
44+
stopwords_path: string
45+
}
46+
47+
export class KeywordAnalyzer extends AnalyzerBase {}
48+
49+
export class LanguageAnalyzer extends AnalyzerBase {
50+
language: Language
51+
stem_exclusion: string[]
52+
stopwords: StopWords
53+
stopwords_path: string
54+
type: string
55+
}
56+
57+
export class NoriAnalyzer extends AnalyzerBase {
58+
decompound_mode: NoriDecompoundMode
59+
stoptags: string[]
60+
user_dictionary: string
61+
}
62+
63+
export class PatternAnalyzer extends AnalyzerBase {
64+
flags: string
65+
lowercase: boolean
66+
pattern: string
67+
stopwords: StopWords
68+
}
69+
70+
export class SimpleAnalyzer extends AnalyzerBase {}
71+
72+
export class SnowballAnalyzer extends AnalyzerBase {
73+
language: SnowballLanguage
74+
stopwords: StopWords
75+
}
76+
77+
export class StandardAnalyzer extends AnalyzerBase {
78+
max_token_length: integer
79+
stopwords: StopWords
80+
}
81+
82+
export class StopAnalyzer extends AnalyzerBase {
83+
stopwords: StopWords
84+
stopwords_path: string
85+
}
86+
87+
export class WhitespaceAnalyzer extends AnalyzerBase {}

specification/_types/analysis/analyzers/AnalyzerBase.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

specification/_types/analysis/analyzers/CustomAnalyzer.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

specification/_types/analysis/analyzers/FingerprintAnalyzer.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

specification/_types/analysis/analyzers/KeywordAnalyzer.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

specification/_types/analysis/analyzers/LanguageAnalyzer.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

specification/_types/analysis/analyzers/NoriAnalyzer.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

specification/_types/analysis/analyzers/PatternAnalyzer.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

specification/_types/analysis/analyzers/SimpleAnalyzer.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

specification/_types/analysis/analyzers/SnowballAnalyzer.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

specification/_types/analysis/analyzers/StandardAnalyzer.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

specification/_types/analysis/analyzers/StopAnalyzer.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)