diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-04-27 16:09:46 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-04-27 16:09:46 +0200 |
commit | 1e2668f0db7043dd44add1775b2e96fcfec33bc3 (patch) | |
tree | 69849fbc57e3dda1058d343c7ff9781d4ab7cb51 /container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java | |
parent | 482b085d278875ec99b2c7442a4255ed86f78d21 (diff) |
Remove LazyField (not used)
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java | 56 |
1 files changed, 7 insertions, 49 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 9ab84845d9c..48b35eb7d63 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 @@ -21,13 +21,14 @@ public class FastHit extends Hit { private static final GlobalId emptyGlobalId = new GlobalId(new byte[GlobalId.LENGTH]); - /** The global id of this document in the backend node which produced it */ - private GlobalId globalId = emptyGlobalId; + /** The index of the content node this hit originated at */ + private int distributionKey = 0; + /** The local identifier of the content store for this hit on the node it originated at */ private int partId; - /** The index of the content node this hit originated at*/ - private int distributionKey = 0; + /** The global id of this document in the backend node which produced it */ + private GlobalId globalId = emptyGlobalId; /** Full information pointing to the location of further data for this hit. Lazily set */ private URI indexUri = null; @@ -198,20 +199,12 @@ public class FastHit extends Hit { return false; } - /** - * Only needed when fetching summaries in 2 phase. - * - * @return distribution key of node where the hit originated from - */ + /** Returns the index of the node this hit originated at */ public int getDistributionKey() { return distributionKey; } - /** - * Only needed when fetching summaries in 2 phase. - * - * @param distributionKey Of node where you find this hit. - */ + /** Returns the index of the node this hit originated at */ public void setDistributionKey(int distributionKey) { this.distributionKey = distributionKey; } @@ -235,20 +228,6 @@ public class FastHit extends Hit { } /** - * Set a field to behave like a string type summary field, not decoding raw - * data till actually used. Added to make testing lazy docsum functionality - * easier. This is not a method to be used for efficiency, as it causes - * object allocations. - * - * @param fieldName the name of the field to insert undecoded UTF-8 into - * @param value an array of valid UTF-8 data - */ - @Beta - public void setLazyStringField(String fieldName, byte[] value) { - setField(fieldName, new LazyString(new StringField(fieldName), new StringValue(value))); - } - - /** * Add the binary data common for the query packet to a Vespa backend and a * summary fetch packet to a Vespa backend. This method can only be called * once for a single hit. @@ -318,25 +297,4 @@ public class FastHit extends Hit { abstract RawField getFieldAsUtf8(String fieldName); } - private static class LazyString extends LazyValue { - - private final Inspector value; - private final DocsumField fieldType; - - LazyString(DocsumField fieldType, Inspector value) { - assert(value.type() == Type.STRING); - this.value = value; - this.fieldType = fieldType; - } - - Object getValue(String fieldName) { - return value.asString(); - } - - RawField getFieldAsUtf8(String fieldName) { - return new RawField(fieldType, value.asUtf8()); - } - - } - } |