Skip to content

Commit f88c637

Browse files
committed
Unify DocValueField and FieldAndFormat
1 parent 48d3699 commit f88c637

File tree

11 files changed

+23
-74
lines changed

11 files changed

+23
-74
lines changed

output/schema/schema.json

Lines changed: 7 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/knn_search/KnnSearchRequest.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Field, Fields, Indices, Routing } from '@_types/common'
21+
import { Fields, Indices, Routing } from '@_types/common'
2222
import { Query } from './_types/Knn'
23-
import {
24-
DocValueField,
25-
SourceConfig,
26-
SourceFilter
27-
} from '@global/search/_types/SourceFilter'
23+
import { SourceConfig } from '@global/search/_types/SourceFilter'
24+
import { FieldAndFormat } from '@_types/query_dsl/abstractions'
2825

2926
/**
3027
* @rest_spec_name knn_search
@@ -55,7 +52,7 @@ export interface Request extends RequestBase {
5552
* The request returns doc values for field names matching these patterns
5653
* in the hits.fields property of the response. Accepts wildcard (*) patterns.
5754
*/
58-
docvalue_fields?: DocValueField[]
55+
docvalue_fields?: FieldAndFormat[]
5956
/**
6057
* List of stored fields to return as part of a hit. If no fields are specified,
6158
* no stored fields are included in the response. If this field is specified, the _source

specification/_global/mget/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { SourceConfig, SourceFilter } from '@global/search/_types/SourceFilter'
20+
import { SourceConfig } from '@global/search/_types/SourceFilter'
2121
import { Dictionary } from '@spec_utils/Dictionary'
2222
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2323
import {

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ import { Highlight } from './_types/highlighting'
4343
import { PointInTimeReference } from './_types/PointInTimeReference'
4444
import { Rescore } from './_types/rescoring'
4545
import { Sort, SortResults } from './_types/sort'
46-
import {
47-
DocValueField,
48-
GetSourceConfig,
49-
SourceConfig,
50-
SourceFilter
51-
} from './_types/SourceFilter'
46+
import { GetSourceConfig, SourceConfig } from './_types/SourceFilter'
5247
import { Suggester } from './_types/suggester'
5348
import { TrackHits } from '@global/search/_types/hits'
5449

@@ -144,7 +139,7 @@ export interface Request extends RequestBase {
144139
* Array of wildcard (*) patterns. The request returns doc values for field
145140
* names matching these patterns in the hits.fields property of the response.
146141
*/
147-
docvalue_fields?: DocValueField[]
142+
docvalue_fields?: FieldAndFormat[]
148143
/**
149144
* Minimum _score for matching documents. Documents with a lower _score are
150145
* not included in the search results.

specification/_global/search/_types/SourceFilter.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,3 @@ export type SourceConfig = boolean | SourceFilter
3838

3939
/** @codegen_names fetch, fields */
4040
export type GetSourceConfig = boolean | Fields
41-
42-
/** @shortcut_property field */
43-
export class DocValueField {
44-
field: Field
45-
format?: string
46-
}

specification/_global/search/_types/highlighting.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export type HighlighterType = BuiltinHighlighterType | string
7676

7777
export enum BuiltinHighlighterType {
7878
plain = 0,
79+
/** @codegen_name fast_vector */
7980
fvh = 1,
8081
unified = 2
8182
}

specification/_global/search/_types/hits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { ScriptField } from '@_types/Scripting'
3535
import { FieldCollapse } from './FieldCollapse'
3636
import { Highlight } from './highlighting'
3737
import { Sort, SortResults } from './sort'
38-
import { SourceConfig, SourceFilter } from './SourceFilter'
38+
import { SourceConfig } from './SourceFilter'
3939
import { FieldAndFormat } from '@_types/query_dsl/abstractions'
4040

4141
export class Hit<TDocument> {

specification/_types/aggregations/metric.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { Highlight } from '@global/search/_types/highlighting'
2121
import { SortOrder, Sort } from '@global/search/_types/sort'
22-
import { SourceConfig, SourceFilter } from '@global/search/_types/SourceFilter'
22+
import { SourceConfig } from '@global/search/_types/SourceFilter'
2323
import { Dictionary } from '@spec_utils/Dictionary'
2424
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2525
import { Field, Fields } from '@_types/common'

specification/async_search/submit/AsyncSearchSubmitRequest.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ import { PointInTimeReference } from '@global/search/_types/PointInTimeReference
4444
import { Rescore } from '@global/search/_types/rescoring'
4545
import { Sort, SortResults } from '@global/search/_types/sort'
4646
import {
47-
DocValueField,
4847
GetSourceConfig,
49-
SourceConfig,
50-
SourceFilter
48+
SourceConfig
5149
} from '@global/search/_types/SourceFilter'
5250
import { Suggester } from '@global/search/_types/suggester'
5351
import { TrackHits } from '@global/search/_types/hits'
@@ -151,7 +149,7 @@ export interface Request extends RequestBase {
151149
* Array of wildcard (*) patterns. The request returns doc values for field
152150
* names matching these patterns in the hits.fields property of the response.
153151
*/
154-
docvalue_fields?: DocValueField[]
152+
docvalue_fields?: FieldAndFormat[]
155153
/**
156154
* Minimum _score for matching documents. Documents with a lower _score are
157155
* not included in the search results.

specification/sql/translate/TranslateSqlResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { Sort } from '@global/search/_types/sort'
21-
import { SourceConfig, SourceFilter } from '@global/search/_types/SourceFilter'
21+
import { SourceConfig } from '@global/search/_types/SourceFilter'
2222
import { Dictionary } from '@spec_utils/Dictionary'
2323
import { Field, Fields } from '@_types/common'
2424
import { long } from '@_types/Numeric'

0 commit comments

Comments
 (0)