aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/test/apps/zkfeed/schemas/pc.sd
blob: bc83d2423f325027b3e2323185c5f6587c9a7299 (plain) (blame)
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
45
46
47
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
search pc {

  document pc inherits product {

    field brand type string {
      indexing: index | summary
    }

    field color type string {
      indexing: summary | index
      index: prefix
      alias: colour
      rank: filter
    }

    field cpuspeed type int {
      indexing: summary
    }

    field location_str type array<string> {

    }
  }

  field location type array<position>  {
    indexing: input location_str | for_each { to_pos } | attribute
  }

  rank-profile default {
    first-phase {
      expression: fieldMatch(brand).completeness + fieldMatch(color).completeness
    }
    second-phase {
      expression: fieldMatch(brand).completeness*fieldMatch(brand).importancy + fieldMatch(color).completeness*fieldMatch(color).importancy
    }

    summary-features: fieldMatch(title) fieldMatch(brand).proximity match.weight.title nativeFieldMatch(title)

    rank-features: attribute(cpuspeed)

    rank-properties {
        fieldMatch(brand).maxOccurrences : 20
    }
  }

}