Skip to content

Commit

Permalink
Upgrade to Lucene 9.4.2 (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
tteofili committed Dec 18, 2022
1 parent 24a1f46 commit 4527a5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</developers>

<properties>
<lucene.version>9.3.0</lucene.version>
<lucene.version>9.4.2</lucene.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/anserini/index/IndexDenseVectors.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.lucene.codecs.KnnVectorsFormat;
import org.apache.lucene.codecs.lucene92.Lucene92Codec;
import org.apache.lucene.codecs.lucene92.Lucene92HnswVectorsFormat;
import org.apache.lucene.codecs.lucene94.Lucene94Codec;
import org.apache.lucene.codecs.lucene94.Lucene94HnswVectorsFormat;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.ConcurrentMergeScheduler;
import org.apache.lucene.index.IndexWriter;
Expand Down Expand Up @@ -384,10 +384,10 @@ public Counters run() throws IOException {
// Used for LocalIndexThread
if (indexPath != null) {
final Directory dir = FSDirectory.open(indexPath);
final IndexWriterConfig config = new IndexWriterConfig().setCodec(new Lucene92Codec(){
final IndexWriterConfig config = new IndexWriterConfig().setCodec(new Lucene94Codec(){
@Override
public KnnVectorsFormat getKnnVectorsFormatForField(String field) {
return new Lucene92HnswVectorsFormat(args.M, args.efC);
return new Lucene94HnswVectorsFormat(args.M, args.efC);
}
});
config.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
Expand Down

0 comments on commit 4527a5d

Please sign in to comment.