(fix)(headless)Fix hash code issue of MetricSchemaResp and DimensionSchemaResp.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
jerryjzhang
2025-03-29 22:42:27 +08:00
parent 232a202275
commit 1fed8ca4d9
6 changed files with 36 additions and 15 deletions

View File

@@ -66,8 +66,8 @@ public class S2OnnxEmbeddingModel extends AbstractInProcessEmbeddingModel {
static OnnxBertBiEncoder loadFromFileSystem(Path pathToModel, URL vocabularyFile) {
try {
return new OnnxBertBiEncoder(Files.newInputStream(pathToModel), vocabularyFile.openStream(),
PoolingMode.MEAN);
return new OnnxBertBiEncoder(Files.newInputStream(pathToModel),
vocabularyFile.openStream(), PoolingMode.MEAN);
} catch (IOException e) {
throw new RuntimeException(e);
}

View File

@@ -81,13 +81,13 @@ public class MilvusEmbeddingStore implements EmbeddingStore<TextSegment> {
// Define the field structure for the collection
this.fieldDefinition = new FieldDefinition(ID_FIELD_NAME, TEXT_FIELD_NAME,
METADATA_FIELD_NAME, VECTOR_FIELD_NAME);
METADATA_FIELD_NAME, VECTOR_FIELD_NAME);
if (!hasCollection(this.milvusClient, this.collectionName)) {
createCollection(this.milvusClient, this.collectionName, fieldDefinition,
ensureNotNull(dimension, "dimension"));
ensureNotNull(dimension, "dimension"));
createIndex(this.milvusClient, this.collectionName, VECTOR_FIELD_NAME,
getOrDefault(indexType, FLAT), this.metricType);
getOrDefault(indexType, FLAT), this.metricType);
}
loadCollectionInMemory(this.milvusClient, collectionName);