aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/result/Hit.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-04-23 11:28:54 +0200
committerJon Bratseth <bratseth@oath.com>2018-04-23 11:28:54 +0200
commit5c8adf3d63a847461a8881101576bde2d5c4fd0b (patch)
treee7c1a7a77710964ef123cdfa4221bac9b70cd274 /container-search/src/main/java/com/yahoo/search/result/Hit.java
parent506f66bda3b65f41496064307ba010bd9c353101 (diff)
Revert "Merge pull request #5663 from vespa-engine/revert-5628-bratseth/dispatch-summaries-take-4"
This reverts commit dc350f9b5b3ea6ec73cb03f9e1a9feee9aedb754, reversing changes made to 416381813ecc71079cebdfc2fbea53db50714014.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/result/Hit.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/Hit.java19
1 files changed, 8 insertions, 11 deletions
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 6adbac56dbe..076e6659d2b 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
@@ -89,10 +89,10 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
* Set to true for hits which does not contain content,
* but which contains meta information about the query or result
*/
- private boolean meta=false;
+ private boolean meta = false;
/** If this is true, then this hit will not be counted as a concrete hit */
- private boolean auxiliary=false;
+ private boolean auxiliary = false;
/**
* The hit field used to store rank features. TODO: Remove on Vespa 7
@@ -403,16 +403,13 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
//TODO Should it be deprecated ?
public final Map<String,Object> fields() { return getUnmodifiableFieldMap(); }
- /**
- * Will preallocate in order to avoid resizing.
- * @param minSize The minimum size to reserve
- */
+ /** Aallocate room for the given number of fields to avoid resizing. */
public void reserve(int minSize) {
getFieldMap(minSize);
}
/**
- * Fields
+ * Returns an iterator over the fields of this
*
* @return an iterator for traversing the fields of this hit
*/
@@ -663,9 +660,7 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
if (p == null) {
return null;
} else if (p instanceof HitField) {
- HitField hf = (HitField) p;
-
- return hf.quotedContent(false);
+ return ((HitField)p).quotedContent(false);
} else if (p instanceof StructuredData) {
return p.toString();
} else if (p instanceof XMLString || p instanceof JSONString) {
@@ -743,9 +738,10 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
}
/**
- * For vespa internal use only.
+ * For internal use only.
* Gives access to the modifiable backing set of filled summaries.
* This set might be unmodifiable if the size is less than or equal to 1
+ *
* @return the set of filled summaries.
*/
protected final Set<String> getFilledInternal() {
@@ -755,6 +751,7 @@ public class Hit extends ListenableFreezableClass implements Data, Comparable<Hi
private Map<String,Object> getFieldMap() {
return getFieldMap(16);
}
+
private Map<String,Object> getFieldMap(int minSize) {
if (fields == null) {
// Compensate for loadfactor and then some, rounded up....