aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/Query.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-08-14 11:15:12 +0200
committerJon Bratseth <bratseth@oath.com>2018-08-14 11:15:12 +0200
commit7b134d8ef30cc3bd6e0867ba3f47452d78d4fce0 (patch)
tree96ef67d3c9998c0f51c289d1e8cfb298b26f0e2f /container-search/src/main/java/com/yahoo/search/Query.java
parent216feb84a135cbcd3e20cdb3240a63fdb53439e3 (diff)
Fix Select and grouping bugs
- Deep copy the grouping structure on query copy. It is mutable but we have neglected doing this right until now. - Fix a bug in the previous commit where the last constructed Query.Model was shared between all instances. - Fix a bug in the previous commit where the query string instead of the query tree was reset when a new select expression is set. - Don't use deprecated method. - Clean up Javadoc and formatting.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/Query.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/Query.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/Query.java b/container-search/src/main/java/com/yahoo/search/Query.java
index cfb1c9a26be..53435941e26 100644
--- a/container-search/src/main/java/com/yahoo/search/Query.java
+++ b/container-search/src/main/java/com/yahoo/search/Query.java
@@ -972,6 +972,7 @@ public class Query extends com.yahoo.processing.Request implements Cloneable {
private void copyPropertiesTo(Query clone) {
clone.model = model.cloneFor(clone);
+ clone.select = select.cloneFor(clone);
clone.ranking = (Ranking) ranking.clone();
clone.presentation = (Presentation) presentation.clone();
clone.context = getContext(true).cloneFor(clone);