diff options
author | Jon Bratseth <bratseth@gmail.com> | 2020-08-05 15:07:42 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2020-08-05 15:07:42 +0200 |
commit | 07c30b9f5c058ceea4f749839b54ebef3c18ccdd (patch) | |
tree | ac881600a1e47913123a14c2a43ecf9422181fb4 | |
parent | 3ef825fc121ab64c2ae643f4a86445e449dfef49 (diff) |
Expose raw summary data
This makes it easier to serialize hits.
3 files changed, 7 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java index 56dfc700ca7..663cb44215d 100644 --- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java +++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java @@ -42,7 +42,7 @@ public class FastHit extends Hit { private byte [] globalId; private transient byte[] sortData = null; - // TODO I supect this one can be dropped. + // TODO I suspect this one can be dropped. private transient Sorting sortDataSorting = null; /** @@ -188,6 +188,11 @@ public class FastHit extends Hit { summaries.add(0, new SummaryData(this, docsumDef, value, 1 + summaries.size())); } + /** Returns the raw summary data available in this as an unmodifiable list */ + public List<SummaryData> summaryData() { + return Collections.unmodifiableList(summaries); + } + /** * Returns values for the features listed in * <a href="https://docs.vespa.ai/documentation/reference/schema-reference.html#summary-features">summary-features</a> diff --git a/container-search/src/main/java/com/yahoo/search/result/Hit.java b/container-search/src/main/java/com/yahoo/search/result/Hit.java index c14b3f39bc1..c4e287bddb1 100644 --- a/container-search/src/main/java/com/yahoo/search/result/Hit.java +++ b/container-search/src/main/java/com/yahoo/search/result/Hit.java @@ -682,7 +682,7 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi * Called for fields which are available as UTF-8 instead of accept(String, Object). * * @param fieldName the name of the field - * @param utf8Data raw utf-8 data. The reciver <b>must not</b> modify this data + * @param utf8Data raw utf-8 data. The receiver <b>must not</b> modify this data * @param offset the start index in the utf8Data array of the data to accept * @param length the length starting from offset in the utf8Data array of the data to accept */ diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java index a6acde87e30..445073ced3a 100644 --- a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java @@ -4,7 +4,6 @@ package com.yahoo.search.query.profile.config.test; import com.yahoo.jdisc.http.HttpRequest.Method; import com.yahoo.container.jdisc.HttpRequest; import com.yahoo.processing.request.CompoundName; -import com.yahoo.search.query.profile.compiled.DimensionalValue; import com.yahoo.yolean.Exceptions; import com.yahoo.search.Query; import com.yahoo.search.query.Properties; @@ -15,7 +14,6 @@ import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry; import com.yahoo.search.query.profile.config.QueryProfileXMLReader; import com.yahoo.search.query.profile.types.FieldDescription; import com.yahoo.search.query.profile.types.QueryProfileType; -import org.junit.Ignore; import org.junit.Test; import java.util.HashMap; |