Skip to content

Commit 433ac23

Browse files
committed
Add test, fix vectors format name and add to module-info
1 parent c1bd0ff commit 433ac23

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

server/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
org.elasticsearch.index.codec.vectors.es816.ES816HnswBinaryQuantizedVectorsFormat,
457457
org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat,
458458
org.elasticsearch.index.codec.vectors.es818.ES818HnswBinaryQuantizedVectorsFormat,
459+
org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsFormat,
459460
org.elasticsearch.index.codec.vectors.IVFVectorsFormat;
460461

461462
provides org.apache.lucene.codecs.Codec

server/src/main/java/org/elasticsearch/index/codec/vectors/es910/ES910HnswReducedHeapVectorsFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
*/
5050
public class ES910HnswReducedHeapVectorsFormat extends KnnVectorsFormat {
5151

52-
static final String NAME = "ES819HnswReducedHeapVectorFormat";
52+
static final String NAME = "ES910HnswReducedHeapVectorsFormat";
5353

5454
static final String META_CODEC_NAME = "Lucene99HnswVectorsFormatMeta";
5555
static final String VECTOR_INDEX_CODEC_NAME = "Lucene99HnswVectorsFormatIndex";

server/src/main/resources/META-INF/services/org.apache.lucene.codecs.KnnVectorsFormat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ org.elasticsearch.index.codec.vectors.es816.ES816BinaryQuantizedVectorsFormat
77
org.elasticsearch.index.codec.vectors.es816.ES816HnswBinaryQuantizedVectorsFormat
88
org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat
99
org.elasticsearch.index.codec.vectors.es818.ES818HnswBinaryQuantizedVectorsFormat
10+
org.elasticsearch.index.codec.vectors.es910.ES910HnswReducedHeapVectorsFormat
1011
org.elasticsearch.index.codec.vectors.IVFVectorsFormat
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.index.codec.vectors.es910;
11+
12+
13+
import org.apache.lucene.codecs.Codec;
14+
import org.apache.lucene.tests.index.BaseKnnVectorsFormatTestCase;
15+
import org.apache.lucene.tests.util.TestUtil;
16+
import org.elasticsearch.common.logging.LogConfigurator;
17+
18+
public class ES910HnswReducedHeapVectorsWriterTests extends BaseKnnVectorsFormatTestCase {
19+
20+
static {
21+
LogConfigurator.loadLog4jPlugins();
22+
LogConfigurator.configureESLogging(); // native access requires logging to be initialized
23+
}
24+
25+
static final Codec codec = TestUtil.alwaysKnnVectorsFormat(new ES910HnswReducedHeapVectorsFormat());
26+
27+
@Override
28+
protected Codec getCodec() {
29+
return codec;
30+
}
31+
}

0 commit comments

Comments
 (0)