Invalid Index error showing at startup

{“action”:“startup”,“error”:“create index: init shard 5Q0pBYENOw6d of index sample_0: init vector index: unrecognized distance metric "2",choose one of ["cosine", "dot", "l2-squared", "manhattan","hamming"]”,“level”:“fatal”,“msg”:“db didn’t start up”,“time”:“2023-11-22T08:59:59Z”}.
Hi Team, facing the above issue, I can identify the cause. But its a startup error how Can I then change it?

Hi @Dharanish !

That’s an interesting one.

I have asked about it internally.

Can you provide more context?
Have you migrated recently?
Is this a brand new class you just created?

That would help a lot.

Thanks!

I created the class a week ago with the below schema

class_obj = {
“class”: ‘sample_0’, # class name
“vectorizer”: “none”, # we are providing the vectors ourselves through our model, so this field is none
“properties”: [{
“name”: “unique_id”,
“dataType”: [“int”]
}], # any data column value other than vector
“vectorIndexType”: “hnsw”,
“vectorIndexConfig”: {
“skip”: False,
“ef”: 50,
“efConstruction”: 50,
“maxConnections”: 32,
“vectorCacheMaxObjects”:400000,
“distance”: “l2-squared” # [“cosine”, “dot”, “l2-squared”, “manhattan”,“hamming”]
},
}
client.schema.create_class(class_obj)

and try to insert some objects but failed with the below error message
{‘status’: ‘error’, ‘message’: "Creating object! Unexpected status code: 500, with response body: {‘error’: [{‘message’: ‘put object: import into non-existing index for Sample_0’}
then deleted that schema an created again it shows

{‘status’: ‘error’, ‘message’: 'Create class! Unexpected status code: 422, with response body: {'error': [{'message': 'create index: init shard 5Q0pBYENOw6d of index sample_0: init vector index: unrecognized distance metric “2”,choose one of [“cosine”, “dot”, “l2-squared”, “manhattan”,“hamming”]'}

then we created another classes works finely without any issues

I didnot make any migration

For testing purpose we killed the nodes and restart them, showing the above startup error .
One thing to note. We opened the file system it doesnot have any files regarding the above class. Other class lsm files are available