Skip to content

Commit b783ea2

Browse files
committed
PR feedback
1 parent adb3180 commit b783ea2

File tree

3 files changed

+30
-51
lines changed

3 files changed

+30
-51
lines changed

specification/_global/mtermvectors/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { TermVectorFilter } from '@global/termvectors/types'
20+
import { Filter, TermVector } from '@global/termvectors/types'
2121
import { Dictionary } from '@spec_utils/Dictionary'
2222
import {
2323
Field,
@@ -29,13 +29,12 @@ import {
2929
VersionType
3030
} from '@_types/common'
3131
import { long } from '@_types/Numeric'
32-
import { TermVector } from '@_types/termvectors/TermVector'
3332

3433
export class Operation {
3534
doc: any
3635
fields: Fields
3736
field_statistics: boolean
38-
filter: TermVectorFilter
37+
filter: Filter
3938
_id: Id
4039
_index: IndexName
4140
offsets: boolean

specification/_global/termvectors/types.ts

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

20-
import { integer } from '@_types/Numeric'
20+
import { Dictionary } from '@spec_utils/Dictionary'
21+
import { double, integer, long } from '@_types/Numeric'
22+
23+
export class TermVector {
24+
field_statistics: FieldStatistics
25+
terms: Dictionary<string, Term>
26+
}
27+
28+
export class FieldStatistics {
29+
doc_count: integer
30+
sum_doc_freq: long
31+
sum_ttf: long
32+
}
33+
34+
export class Term {
35+
doc_freq?: integer
36+
score?: double
37+
term_freq: integer
38+
tokens: Token[]
39+
ttf?: integer
40+
}
41+
42+
export class Token {
43+
end_offset?: integer
44+
payload?: string
45+
position: integer
46+
start_offset?: integer
47+
}
2148

2249
export class TermVectorFilter {
2350
max_doc_freq?: integer

specification/_types/termvectors/TermVector.ts

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

0 commit comments

Comments
 (0)