diff options
Diffstat (limited to 'container-search/src')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java b/container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java index f326903bff5..f680301f1fd 100644 --- a/container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java +++ b/container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java @@ -90,6 +90,7 @@ import com.yahoo.prelude.query.Substring; import com.yahoo.prelude.query.SubstringItem; import com.yahoo.prelude.query.SuffixItem; import com.yahoo.prelude.query.TaggableItem; +import com.yahoo.prelude.query.TermItem; import com.yahoo.prelude.query.ToolBox; import com.yahoo.prelude.query.ToolBox.QueryVisitor; import com.yahoo.prelude.query.UriItem; @@ -645,6 +646,7 @@ public class VespaSerializer { } private static class SameElementSerializer extends Serializer { + @Override void onExit(StringBuilder destination, Item item) { } @@ -654,7 +656,6 @@ public class VespaSerializer { } static boolean serialize(StringBuilder destination, Item item, boolean includeField) { - SameElementItem sameElement = (SameElementItem) item; if (includeField) { @@ -669,10 +670,11 @@ public class VespaSerializer { Item current = sameElement.getItem(i); if (current instanceof WordItem) { new WordSerializer().serialize(destination, current); + } else if (current instanceof IntItem) { + new NumberSerializer().serialize(destination, current); } else { - throw new IllegalArgumentException( - "Serializing of " + current.getClass().getSimpleName() - + " in same_element is not implemented, please report this as a bug."); + throw new IllegalArgumentException("Serializing of " + current.getClass().getSimpleName() + + " in same_element is not implemented, please report this as a bug."); } } destination.append(')'); |