diff options
author | Jon Bratseth <bratseth@oath.com> | 2020-09-29 22:19:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 22:19:23 +0200 |
commit | f83097341198f7908e795c7fd3205b661d053b61 (patch) | |
tree | 9eb6a7829bf96f78f49cc9a0b00cf32a9867c916 /config-model/src/test | |
parent | 44bbdcc733949306595bb1cc5041455ec29ba8ad (diff) | |
parent | 91e3973bd7185d2ddc3514fda2027b4caf4939dc (diff) |
Merge pull request #14613 from vespa-engine/bratseth/rank-profile-model
Support 'model' instead of 'rank-profile'
Diffstat (limited to 'config-model/src/test')
-rw-r--r-- | config-model/src/test/derived/rankprofiles/rankprofiles.sd | 18 | ||||
-rw-r--r-- | config-model/src/test/examples/desktop.sd | 108 |
2 files changed, 9 insertions, 117 deletions
diff --git a/config-model/src/test/derived/rankprofiles/rankprofiles.sd b/config-model/src/test/derived/rankprofiles/rankprofiles.sd index abafee91533..6c3720df589 100644 --- a/config-model/src/test/derived/rankprofiles/rankprofiles.sd +++ b/config-model/src/test/derived/rankprofiles/rankprofiles.sd @@ -19,21 +19,21 @@ search rankprofiles { } - rank-profile default { + model default { } - rank-profile other1 inherits default { + model other1 inherits default { rank field1: filter rank none: filter } - rank-profile other2 inherits other1 { + model other2 inherits other1 { } - rank-profile other3 { + model other3 { } - rank-profile four { + model four { match-phase { attribute: field2 order: ascending @@ -41,7 +41,7 @@ search rankprofiles { } } - rank-profile five { + model five { match-phase { attribute: field2 order: descending @@ -49,14 +49,14 @@ search rankprofiles { } } - rank-profile six { + model six { match-phase { attribute: field3 max-hits: 666 } } - rank-profile seven { + model seven { match-phase { attribute: field3 max-hits:800 @@ -65,7 +65,7 @@ search rankprofiles { } } - rank-profile eight inherits seven { + model eight inherits seven { } diff --git a/config-model/src/test/examples/desktop.sd b/config-model/src/test/examples/desktop.sd deleted file mode 100644 index 82741dbe53f..00000000000 --- a/config-model/src/test/examples/desktop.sd +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -# A search definition of medium complexity -search desktop { - - # A document with some fields. - # The fields implicitly defines some indices, summary fields and attributes - document desktop inherits product { - - field title type text { - mandatory: true - indexing: summary | attribute | index_text - # index-to: title, default - - rank-weight: 300 - rank-type: identity - } - - field manufacturer type text { - indexing: summary | attribute | index - # index-to: manufacturer, default - alias: producer, brand - - rank-type: identity - rank-weight:200 - } - - field description type text { - indexing: summary | index - - rank-type: about - rank-weight: 100 - result-transform: dynamicteaser - } - - field category type text { - indexing: index - # index-to: category, default - rank-weight: 50 - } - - field minprice type int { - indexing: summary | attribute | index - index-decimals: 2 - - rank-type: simple - weight: 30 - staticrankbits: 16 - } - - field someorder type int { - indexing: attribute someorderranking - staticrankbits someorderranking: 32 - } - - # index_url implicitly defines some fields not contained in the document (contexts) - # If attributes needs to be set on these, it can be done by explicitly listing - # the fields outside documents (show). - # I think we should maybe allow setting such field attributes inside the parent - # field as well for convenience. Both is shown. - field url type url { - # Should index mean index_url for url type fields? - indexing: summary | index_url - parse-mode: url # Must be default for url types, but shown here anyway - - rank-type: link - } - - } - - field category_arr type array<text> { - indexing: input category | split ";" | attribute category_arr - } - - # Overriding some url field setting from rank-type link - field url.host { - weight: 1000 - } - - # Setting an attribute on a non-field index - # This is redunant, as default is default - index default { - default: true - } - - # Optionally specify a desire to use a shared dictionary ("catalogs") - shared-dictionary: normal, title, manufacturer - - # Optionally set rank values for all indices - # Default is the name of the default one - # Rank settings from individual fields can be selectively overridden - rankprofile default { - firstocc-boost text: 200 - } - - # Another rank profile - rankprofile predefinedorder { - dynamicranking: off - attribute: someorder - } - - # Some experimental ranking changes - rankprofile experimental inherits default { - firstocc-boost text: 300 - } - -} - - |