summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java')
-rw-r--r--core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java24
1 files changed, 0 insertions, 24 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java b/core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java
index 8db9afe5ae..a164faff8b 100644
--- a/core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java
+++ b/core/src/main/java/org/elasticsearch/search/suggest/completion/context/CategoryQueryContext.java
@@ -21,14 +21,11 @@ package org.elasticsearch.search.suggest.completion.context;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.ParseField;
-import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import java.io.IOException;
-import java.util.Collections;
import java.util.Objects;
import static org.elasticsearch.search.suggest.completion.context.CategoryContextMapping.CONTEXT_BOOST;
@@ -98,11 +95,6 @@ public final class CategoryQueryContext implements QueryContext {
return result;
}
- @Override
- public String getWriteableName() {
- return NAME;
- }
-
private static ObjectParser<Builder, Void> CATEGORY_PARSER = new ObjectParser<>(NAME, null);
static {
CATEGORY_PARSER.declareString(Builder::setCategory, new ParseField(CONTEXT_VALUE));
@@ -134,22 +126,6 @@ public final class CategoryQueryContext implements QueryContext {
return builder;
}
- @Override
- public void writeTo(StreamOutput out) throws IOException {
- out.writeBoolean(isPrefix);
- out.writeVInt(boost);
- out.writeString(category);
- }
-
- @Override
- public QueryContext readFrom(StreamInput in) throws IOException {
- Builder builder = new Builder();
- builder.isPrefix = in.readBoolean();
- builder.boost = in.readVInt();
- builder.category = in.readString();
- return builder.build();
- }
-
public static class Builder {
private String category;
private boolean isPrefix = false;