Skip to content

Commit

Permalink
try lucene 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis95 committed Mar 23, 2019
1 parent 1964dfa commit 1855d99
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion zulia-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
description = "Zulia Server"


val luceneVersion = "7.7.1"
val luceneVersion = "8.0.0"


defaultTasks("build", "installDist")
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -22,8 +21,6 @@

public class ConstantSimilarity extends TFIDFSimilarity {



@Override
public float tf(float freq) {
return 1f;
Expand All @@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public ZuliaQuery.ShardQueryResponse queryShard(Query query, Map<String, ZuliaBa
collector = getSortingCollector(sortRequest, hasMoreAmount, after);
}
else {
collector = TopScoreDocCollector.create(hasMoreAmount, after);
collector = TopScoreDocCollector.create(hasMoreAmount, after, Integer.MAX_VALUE);
}

ZuliaQuery.ShardQueryResponse.Builder shardQueryReponseBuilder = ZuliaQuery.ShardQueryResponse.newBuilder();
Expand Down Expand Up @@ -462,7 +462,7 @@ else if (FieldTypeUtil.isDateFieldType(sortFieldType)) {
Sort sort = new Sort();
sort.setSort(sortFields.toArray(new SortField[sortFields.size()]));

collector = TopFieldCollector.create(sort, hasMoreAmount, after, true, true, true, true);
collector = TopFieldCollector.create(sort, hasMoreAmount, after, Integer.MAX_VALUE);
return collector;
}

Expand Down

0 comments on commit 1855d99

Please sign in to comment.