aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/rankproperties/rankproperties.sd
blob: a2eb987d4ff39c2ab452ab4a2cdf28ce1a5ae481 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema rankproperties {

  document rankproperties {

    field title type string {
      indexing: index
      weight: 50
    }

    field description type string {
      indexing: index
      weight: 10
    }

    field tag type string {
      indexing: attribute
    }

  }

  rank-profile default {
    weight tag: 33
    first-phase {
      expression: nativeFieldMatch
    }
    second-phase {
      expression: match
    }
    rank-properties {
      $test1:"foo"
      query(test2): 12.3
      #$weight:1
    }
  }

  rank-profile child inherits default {
    weight title: 15
    #rank-properties {
    #  $test:"bar"
    #  $weight:2
    #}
    #first-phase {
    #  expression {
    #    $weight
    #  }
    #}
  }

  rank-profile standalone {
    weight description: 35
    weight tag: 88

    first-phase {
      expression: match + fieldMatch(title)
    }
    second-phase {
      expression: match + nativeFieldMatch
    }
  }

}