1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
search tensor {
document tensor {
field f1 type tensor(x[]) {
indexing: summary
}
field f2 type tensor(x[2],y[]) {
indexing: attribute
}
field f3 type tensor(x{}) {
indexing: attribute | summary
}
field f4 type tensor(x[],y[]) {
indexing: attribute | summary
attribute: tensor(x[10],y[20])
}
}
rank-profile profile1 {
first-phase {
expression: sum(map(attribute(f4),f(x)(x*x)) + reduce(random(x[2],y[3]), count) * rename(attribute(f4), (x, y), (y, x)))
}
}
rank-profile profile2 {
first-phase {
expression: sum(matmul(attribute(f4), diag(x[2],y[2],z[3]), x))
}
}
rank-profile profile3 {
first-phase {
expression: sum(tensor(i[10])(i) * attribute(f4))
}
}
}
|