summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java b/container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java
index 037a49a3b65..16e22f6d482 100644
--- a/container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java
+++ b/container-search/src/main/java/com/yahoo/prelude/query/PhraseSegmentItem.java
@@ -5,6 +5,7 @@ import com.yahoo.prelude.query.textualrepresentation.Discloser;
import java.nio.ByteBuffer;
import java.util.Iterator;
+import java.util.Objects;
import java.util.Optional;
@@ -203,4 +204,15 @@ public class PhraseSegmentItem extends IndexedSegmentItem {
discloser.addProperty("explicit", explicit);
}
+ @Override
+ public boolean equals(Object other) {
+ if ( ! super.equals(other)) return false;
+ return this.explicit == ((PhraseSegmentItem)other).explicit;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), explicit);
+ }
+
}