summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/suggest/SortBy.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/suggest/SortBy.java')
-rw-r--r--core/src/main/java/org/elasticsearch/search/suggest/SortBy.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/suggest/SortBy.java b/core/src/main/java/org/elasticsearch/search/suggest/SortBy.java
index 14d46d134d..bab2b1ce61 100644
--- a/core/src/main/java/org/elasticsearch/search/suggest/SortBy.java
+++ b/core/src/main/java/org/elasticsearch/search/suggest/SortBy.java
@@ -36,15 +36,12 @@ public enum SortBy implements Writeable<SortBy> {
/** Sort should first be based on document frequency, then score and then the term itself. */
FREQUENCY;
- public static SortBy PROTOTYPE = SCORE;
-
@Override
public void writeTo(final StreamOutput out) throws IOException {
out.writeVInt(ordinal());
}
- @Override
- public SortBy readFrom(final StreamInput in) throws IOException {
+ public static SortBy readFromStream(final StreamInput in) throws IOException {
int ordinal = in.readVInt();
if (ordinal < 0 || ordinal >= values().length) {
throw new IOException("Unknown SortBy ordinal [" + ordinal + "]");