mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(fix)(headless)Fix hash code issue of MetricSchemaResp and DimensionSchemaResp.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user