Skip to content

Commit 16abb0a

Browse files
github-actions[bot]l-trottapquentin
authored
Fixing indices create partially (#4652) (#4714)
* index create fixes * Update specification/_types/analysis/token_filters.ts * addressing review * persian stem add * add comment * revert making locale optional just for validation --------- (cherry picked from commit 92bd777) Co-authored-by: Laura Trotta <[email protected]> Co-authored-by: Quentin Pradet <[email protected]>
1 parent 2cd39e9 commit 16abb0a

File tree

8 files changed

+80
-8
lines changed

8 files changed

+80
-8
lines changed

specification/_types/analysis/icu-plugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ export class IcuFoldingTokenFilter extends TokenFilterBase {
5252
export class IcuCollationTokenFilter extends TokenFilterBase {
5353
type: 'icu_collation'
5454
alternate?: IcuCollationAlternate
55-
case_first?: IcuCollationCaseFirst
56-
case_level?: boolean
55+
caseFirst?: IcuCollationCaseFirst
56+
caseLevel?: boolean
5757
country?: string
5858
decomposition?: IcuCollationDecomposition
59-
hiragana_quaternary_mode?: boolean
59+
hiraganaQuaternaryMode?: boolean
6060
language?: string
6161
numeric?: boolean
6262
rules?: string
6363
strength?: IcuCollationStrength
64-
variable_top?: string
64+
variableTop?: string
6565
variant?: string
6666
}
6767

specification/_types/analysis/token_filters.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ export class PatternReplaceTokenFilter extends TokenFilterBase {
383383
type: 'pattern_replace'
384384
/** If `true`, all substrings matching the pattern parameter’s regular expression are replaced. If `false`, the filter replaces only the first matching substring in each token. Defaults to `true`. */
385385
all?: boolean
386+
flags?: string
386387
/** Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter. */
387388
pattern: string
388389
/** Replacement substring. Defaults to an empty substring (`""`). */
@@ -486,6 +487,14 @@ export class FlattenGraphTokenFilter extends TokenFilterBase {
486487
type: 'flatten_graph'
487488
}
488489

490+
export class BengaliNormalizationTokenFilter extends TokenFilterBase {
491+
type: 'bengali_normalization'
492+
}
493+
494+
export class BrazilianStemTokenFilter extends TokenFilterBase {
495+
type: 'brazilian_stem'
496+
}
497+
489498
export class GermanNormalizationTokenFilter extends TokenFilterBase {
490499
type: 'german_normalization'
491500
}
@@ -535,6 +544,34 @@ export class SoraniNormalizationTokenFilter extends TokenFilterBase {
535544
type: 'sorani_normalization'
536545
}
537546

547+
export class ArabicStemTokenFilter extends TokenFilterBase {
548+
type: 'arabic_stem'
549+
}
550+
551+
export class CzechStemTokenFilter extends TokenFilterBase {
552+
type: 'czech_stem'
553+
}
554+
555+
export class FrenchStemTokenFilter extends TokenFilterBase {
556+
type: 'french_stem'
557+
}
558+
559+
export class DutchStemTokenFilter extends TokenFilterBase {
560+
type: 'dutch_stem'
561+
}
562+
563+
export class GermanStemTokenFilter extends TokenFilterBase {
564+
type: 'german_stem'
565+
}
566+
567+
export class RussianStemTokenFilter extends TokenFilterBase {
568+
type: 'russian_stem'
569+
}
570+
571+
export class PersianStemTokenFilter extends TokenFilterBase {
572+
type: 'persian_stem'
573+
}
574+
538575
/**
539576
* @codegen_names name, definition
540577
* @ext_doc_id analysis-tokenfilters
@@ -548,20 +585,27 @@ export type TokenFilter = string | TokenFilterDefinition
548585
*/
549586
export type TokenFilterDefinition =
550587
| ApostropheTokenFilter
588+
| ArabicStemTokenFilter
551589
| ArabicNormalizationTokenFilter
552590
| AsciiFoldingTokenFilter
591+
| BengaliNormalizationTokenFilter
592+
| BrazilianStemTokenFilter
553593
| CjkBigramTokenFilter
554594
| CjkWidthTokenFilter
555595
| ClassicTokenFilter
556596
| CommonGramsTokenFilter
557597
| ConditionTokenFilter
598+
| CzechStemTokenFilter
558599
| DecimalDigitTokenFilter
559600
| DelimitedPayloadTokenFilter
601+
| DutchStemTokenFilter
560602
| EdgeNGramTokenFilter
561603
| ElisionTokenFilter
562604
| FingerprintTokenFilter
563605
| FlattenGraphTokenFilter
606+
| FrenchStemTokenFilter
564607
| GermanNormalizationTokenFilter
608+
| GermanStemTokenFilter
565609
| HindiNormalizationTokenFilter
566610
| HunspellTokenFilter
567611
| HyphenationDecompounderTokenFilter
@@ -581,10 +625,12 @@ export type TokenFilterDefinition =
581625
| PatternCaptureTokenFilter
582626
| PatternReplaceTokenFilter
583627
| PersianNormalizationTokenFilter
628+
| PersianStemTokenFilter
584629
| PorterStemTokenFilter
585630
| PredicateTokenFilter
586631
| RemoveDuplicatesTokenFilter
587632
| ReverseTokenFilter
633+
| RussianStemTokenFilter
588634
| ScandinavianFoldingTokenFilter
589635
| ScandinavianNormalizationTokenFilter
590636
| SerbianNormalizationTokenFilter

specification/_types/analysis/tokenizers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ export class EdgeNGramTokenizer extends TokenizerBase {
5050
custom_token_chars?: string
5151
max_gram?: integer
5252
min_gram?: integer
53-
/**
54-
* @server_default []
55-
*/
56-
token_chars?: TokenChar[]
53+
token_chars?: string | TokenChar[]
5754
}
5855

5956
export enum TokenChar {

specification/_types/mapping/Property.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import {
5959
PercolatorProperty,
6060
RankFeatureProperty,
6161
RankFeaturesProperty,
62+
RankVectorProperty,
6263
ScaledFloatNumberProperty,
6364
SearchAsYouTypeProperty,
6465
SemanticTextProperty,
@@ -147,6 +148,7 @@ export type Property =
147148
| NestedProperty
148149
| ObjectProperty
149150
| PassthroughObjectProperty
151+
| RankVectorProperty
150152
| SemanticTextProperty
151153
| SparseVectorProperty
152154

specification/_types/mapping/complex.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class FlattenedProperty extends PropertyBase {
3333
null_value?: string
3434
similarity?: string
3535
split_queries_on_whitespace?: boolean
36+
time_series_dimensions?: string[]
3637
type: 'flattened'
3738
}
3839

@@ -59,6 +60,7 @@ export class PassthroughObjectProperty extends CorePropertyBase {
5960
export class AggregateMetricDoubleProperty extends PropertyBase {
6061
type: 'aggregate_metric_double'
6162
default_metric: string
63+
ignore_malformed?: boolean
6264
metrics: string[]
6365
time_series_metric?: TimeSeriesMetricType
6466
}

specification/_types/mapping/core.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,17 @@ export class RankFeaturesProperty extends PropertyBase {
212212
type: 'rank_features'
213213
}
214214

215+
/**
216+
* Technical preview
217+
*/
218+
export class RankVectorProperty extends PropertyBase {
219+
type: 'rank_vectors'
220+
element_type?: RankVectorElementType
221+
dims?: integer
222+
}
223+
215224
export class SparseVectorProperty extends PropertyBase {
225+
store?: boolean
216226
type: 'sparse_vector'
217227
}
218228

@@ -356,3 +366,9 @@ export class DynamicProperty extends DocValuesPropertyBase {
356366
precision_step?: integer
357367
locale?: string
358368
}
369+
370+
export enum RankVectorElementType {
371+
byte,
372+
float,
373+
bit
374+
}

specification/_types/mapping/geo.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export class GeoPointProperty extends DocValuesPropertyBase {
2929
on_script_error?: OnScriptError
3030
script?: Script
3131
type: 'geo_point'
32+
time_series_metric?: GeoPointMetricType
33+
}
34+
35+
export enum GeoPointMetricType {
36+
gauge,
37+
counter,
38+
position
3239
}
3340

3441
export enum GeoOrientation {

specification/indices/_types/IndexSettings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ export class Storage {
540540
* of memory maps so you need disable the ability to use memory-mapping.
541541
*/
542542
allow_mmap?: boolean
543+
/** How often store statistics are refreshed */
544+
stats_refresh_interval?: Duration
543545
}
544546

545547
/**

0 commit comments

Comments
 (0)