aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java b/container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java
index af7aab23b85..aafb740de1d 100644
--- a/container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java
+++ b/container-search/src/main/java/com/yahoo/prelude/semantics/rule/LiteralPhraseProduction.java
@@ -50,16 +50,8 @@ public class LiteralPhraseProduction extends TermProduction {
for (String term : terms)
newPhrase.addItem(new WordItem(term));
- if (replacing) {
- Match matched = e.getNonreferencedMatch(0);
- insertMatch(e, matched, List.of(newPhrase), offset);
- }
- else {
- newPhrase.setWeight(getWeight());
- if (e.getTraceLevel() >= 6)
- e.trace(6, "Adding '" + newPhrase + "'");
- e.addItems(List.of(newPhrase), getTermType());
- }
+ Match matched = e.getNonreferencedMatch(0);
+ insertMatch(e, matched, List.of(newPhrase), offset);
}
public String toInnerTermString() {