summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-03-26 08:24:11 +0100
committerJon Bratseth <bratseth@gmail.com>2021-03-26 08:24:11 +0100
commit487b7df266d74511d30aa048988c9f89995d97ac (patch)
tree9a4eace0c0b0c9af417acfa1afed3db547f9c9f7 /container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java
parent1a7f7f0028c579aac2ce6747b6f9e02ebc0f31d6 (diff)
Carry weight
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java b/container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java
index 5eff8f8033a..d1a74a991da 100644
--- a/container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java
+++ b/container-search/src/main/java/com/yahoo/prelude/semantics/rule/TermProduction.java
@@ -60,7 +60,8 @@ public abstract class TermProduction extends Production {
* TODO: Move to ruleevaluation
*/
protected void insertMatch(RuleEvaluation e, Match matched, Item newItem, int offset) {
- newItem.setWeight(getWeight());
+ if (getWeight() != 100)
+ newItem.setWeight(getWeight());
int insertPosition = matched.getPosition()+offset;
// This check is necessary (?) because earlier items may have been removed