Skip to content

Fixing indices create partially #4652

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions specification/_types/analysis/icu-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ export class IcuFoldingTokenFilter extends TokenFilterBase {
export class IcuCollationTokenFilter extends TokenFilterBase {
type: 'icu_collation'
alternate?: IcuCollationAlternate
case_first?: IcuCollationCaseFirst
case_level?: boolean
caseFirst?: IcuCollationCaseFirst
caseLevel?: boolean
country?: string
decomposition?: IcuCollationDecomposition
hiragana_quaternary_mode?: boolean
hiraganaQuaternaryMode?: boolean
language?: string
numeric?: boolean
rules?: string
strength?: IcuCollationStrength
variable_top?: string
variableTop?: string
variant?: string
}

Expand Down
46 changes: 46 additions & 0 deletions specification/_types/analysis/token_filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ export class PatternReplaceTokenFilter extends TokenFilterBase {
type: 'pattern_replace'
/** 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`. */
all?: boolean
flags?: string
/** Regular expression, written in Java’s regular expression syntax. The filter replaces token substrings matching this pattern with the substring in the `replacement` parameter. */
pattern: string
/** Replacement substring. Defaults to an empty substring (`""`). */
Expand Down Expand Up @@ -486,6 +487,14 @@ export class FlattenGraphTokenFilter extends TokenFilterBase {
type: 'flatten_graph'
}

export class BengaliNormalizationTokenFilter extends TokenFilterBase {
type: 'bengali_normalization'
}

export class BrazilianStemTokenFilter extends TokenFilterBase {
type: 'brazilian_stem'
}

export class GermanNormalizationTokenFilter extends TokenFilterBase {
type: 'german_normalization'
}
Expand Down Expand Up @@ -535,6 +544,34 @@ export class SoraniNormalizationTokenFilter extends TokenFilterBase {
type: 'sorani_normalization'
}

export class ArabicStemTokenFilter extends TokenFilterBase {
type: 'arabic_stem'
}

export class CzechStemTokenFilter extends TokenFilterBase {
type: 'czech_stem'
}

export class FrenchStemTokenFilter extends TokenFilterBase {
type: 'french_stem'
}

export class DutchStemTokenFilter extends TokenFilterBase {
type: 'dutch_stem'
}

export class GermanStemTokenFilter extends TokenFilterBase {
type: 'german_stem'
}

export class RussianStemTokenFilter extends TokenFilterBase {
type: 'russian_stem'
}

export class PersianStemTokenFilter extends TokenFilterBase {
type: 'persian_stem'
}

/**
* @codegen_names name, definition
* @ext_doc_id analysis-tokenfilters
Expand All @@ -548,20 +585,27 @@ export type TokenFilter = string | TokenFilterDefinition
*/
export type TokenFilterDefinition =
| ApostropheTokenFilter
| ArabicStemTokenFilter
| ArabicNormalizationTokenFilter
| AsciiFoldingTokenFilter
| BengaliNormalizationTokenFilter
| BrazilianStemTokenFilter
| CjkBigramTokenFilter
| CjkWidthTokenFilter
| ClassicTokenFilter
| CommonGramsTokenFilter
| ConditionTokenFilter
| CzechStemTokenFilter
| DecimalDigitTokenFilter
| DelimitedPayloadTokenFilter
| DutchStemTokenFilter
| EdgeNGramTokenFilter
| ElisionTokenFilter
| FingerprintTokenFilter
| FlattenGraphTokenFilter
| FrenchStemTokenFilter
| GermanNormalizationTokenFilter
| GermanStemTokenFilter
| HindiNormalizationTokenFilter
| HunspellTokenFilter
| HyphenationDecompounderTokenFilter
Expand All @@ -581,10 +625,12 @@ export type TokenFilterDefinition =
| PatternCaptureTokenFilter
| PatternReplaceTokenFilter
| PersianNormalizationTokenFilter
| PersianStemTokenFilter
| PorterStemTokenFilter
| PredicateTokenFilter
| RemoveDuplicatesTokenFilter
| ReverseTokenFilter
| RussianStemTokenFilter
| ScandinavianFoldingTokenFilter
| ScandinavianNormalizationTokenFilter
| SerbianNormalizationTokenFilter
Expand Down
5 changes: 1 addition & 4 deletions specification/_types/analysis/tokenizers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ export class EdgeNGramTokenizer extends TokenizerBase {
custom_token_chars?: string
max_gram?: integer
min_gram?: integer
/**
* @server_default []
*/
token_chars?: TokenChar[]
token_chars?: string | TokenChar[]
}

export enum TokenChar {
Expand Down
2 changes: 2 additions & 0 deletions specification/_types/mapping/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import {
PercolatorProperty,
RankFeatureProperty,
RankFeaturesProperty,
RankVectorProperty,
ScaledFloatNumberProperty,
SearchAsYouTypeProperty,
SemanticTextProperty,
Expand Down Expand Up @@ -147,6 +148,7 @@ export type Property =
| NestedProperty
| ObjectProperty
| PassthroughObjectProperty
| RankVectorProperty
| SemanticTextProperty
| SparseVectorProperty

Expand Down
2 changes: 2 additions & 0 deletions specification/_types/mapping/complex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class FlattenedProperty extends PropertyBase {
null_value?: string
similarity?: string
split_queries_on_whitespace?: boolean
time_series_dimensions?: string[]
type: 'flattened'
}

Expand All @@ -59,6 +60,7 @@ export class PassthroughObjectProperty extends CorePropertyBase {
export class AggregateMetricDoubleProperty extends PropertyBase {
type: 'aggregate_metric_double'
default_metric: string
ignore_malformed?: boolean
metrics: string[]
time_series_metric?: TimeSeriesMetricType
}
16 changes: 16 additions & 0 deletions specification/_types/mapping/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,17 @@ export class RankFeaturesProperty extends PropertyBase {
type: 'rank_features'
}

/**
* Technical preview
*/
export class RankVectorProperty extends PropertyBase {
type: 'rank_vectors'
element_type?: RankVectorElementType
dims?: integer
}

Comment on lines +220 to +225
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a technical preview feature, how can we specify it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this work? since type is the internal tag

export class RankVectorProperty extends PropertyBase {
  /**
   * @availability stack since=8.18.0 stability=experimental
   */
  type: 'rank_vectors'
  element_type?: RankVectorElementType
  dims?: integer
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I don't think that is possible today, see #2830. Leaving this for future work then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment at least?

export class SparseVectorProperty extends PropertyBase {
store?: boolean
type: 'sparse_vector'
}

Expand Down Expand Up @@ -371,3 +381,9 @@ export class DynamicProperty extends DocValuesPropertyBase {
precision_step?: integer
locale?: string
}

export enum RankVectorElementType {
byte,
float,
bit
}
7 changes: 7 additions & 0 deletions specification/_types/mapping/geo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export class GeoPointProperty extends DocValuesPropertyBase {
on_script_error?: OnScriptError
script?: Script
type: 'geo_point'
time_series_metric?: GeoPointMetricType
}

export enum GeoPointMetricType {
gauge,
counter,
position
}

export enum GeoOrientation {
Expand Down
2 changes: 2 additions & 0 deletions specification/indices/_types/IndexSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ export class Storage {
* of memory maps so you need disable the ability to use memory-mapping.
*/
allow_mmap?: boolean
/** How often store statistics are refreshed */
stats_refresh_interval?: Duration
}

/**
Expand Down