From 1855d9983f48407659a10d9d614d9c050ff33cae Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 23 Mar 2019 08:50:00 -0400 Subject: [PATCH] try lucene 8.0 --- zulia-server/build.gradle.kts | 2 +- .../analysis/similarity/ConstantSimilarity.java | 12 ------------ .../server/analysis/similarity/TFSimilarity.java | 9 --------- .../main/java/io/zulia/server/index/ShardReader.java | 4 ++-- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/zulia-server/build.gradle.kts b/zulia-server/build.gradle.kts index c1061376..2874c0fe 100644 --- a/zulia-server/build.gradle.kts +++ b/zulia-server/build.gradle.kts @@ -5,7 +5,7 @@ plugins { description = "Zulia Server" -val luceneVersion = "7.7.1" +val luceneVersion = "8.0.0" defaultTasks("build", "installDist") diff --git a/zulia-server/src/main/java/io/zulia/server/analysis/similarity/ConstantSimilarity.java b/zulia-server/src/main/java/io/zulia/server/analysis/similarity/ConstantSimilarity.java index 6e3edf71..6c42f452 100644 --- a/zulia-server/src/main/java/io/zulia/server/analysis/similarity/ConstantSimilarity.java +++ b/zulia-server/src/main/java/io/zulia/server/analysis/similarity/ConstantSimilarity.java @@ -1,7 +1,6 @@ package io.zulia.server.analysis.similarity; import org.apache.lucene.search.similarities.TFIDFSimilarity; -import org.apache.lucene.util.BytesRef; /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -22,8 +21,6 @@ public class ConstantSimilarity extends TFIDFSimilarity { - - @Override public float tf(float freq) { return 1f; @@ -39,13 +36,4 @@ public float lengthNorm(int length) { return 1f; } - @Override - public float sloppyFreq(int distance) { - return 1f; - } - - @Override - public float scorePayload(int doc, int start, int end, BytesRef payload) { - return 1f; - } } \ No newline at end of file diff --git a/zulia-server/src/main/java/io/zulia/server/analysis/similarity/TFSimilarity.java b/zulia-server/src/main/java/io/zulia/server/analysis/similarity/TFSimilarity.java index 2c7eccd6..03feb613 100644 --- a/zulia-server/src/main/java/io/zulia/server/analysis/similarity/TFSimilarity.java +++ b/zulia-server/src/main/java/io/zulia/server/analysis/similarity/TFSimilarity.java @@ -1,7 +1,6 @@ package io.zulia.server.analysis.similarity; import org.apache.lucene.search.similarities.TFIDFSimilarity; -import org.apache.lucene.util.BytesRef; /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,13 +36,5 @@ public float lengthNorm(int length) { return 1f; } - @Override - public float sloppyFreq(int distance) { - return 1f; - } - @Override - public float scorePayload(int doc, int start, int end, BytesRef payload) { - return 1f; - } } \ No newline at end of file diff --git a/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java b/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java index eb05f09f..2b1db04d 100644 --- a/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java +++ b/zulia-server/src/main/java/io/zulia/server/index/ShardReader.java @@ -177,7 +177,7 @@ public ZuliaQuery.ShardQueryResponse queryShard(Query query, Map