issue with solr.DenseVectorField - list of strings instead of list of floats

120 Views Asked by At

I have deployed Apache Solr 9.3 in solr cloud mode. 
I have one of the fields based on DenseVectorField which is defined as 
<fieldType name="knn_vector" class="solr.DenseVectorField" vectorDimension="512" similarityFunction="cosine"/>

<field name="vector" type="knn_vector" indexed="true" stored="true"/>

And as per documentation (as well as the requirement/expectation) the data for the field vector should be stored as the list of floats, but It is getting stored as list of strings. this causes queries on the vector field to fail too.

we use pysolr to index data, but I tried with collection API too.
i am using ubuntu20 with java 17

What could be the reason for this and how to resolve it?

Any help on this would be greatly appreciated, TIA

we tried multiple things like:-

  • uploading conf first to zookeeper with the field-type and field, for vector field then creating collection with the conf - same results

  • uploading conf first to zookeeper without the field-type and field, for vector field and then creating it using schema API - same results

  • creating the whole schema using Schema Designer- same results.

from solr Admin UI as well as fetching data anyway I get back list of string instead of list of floats

Update:

Found when I set up the collection with more than 1 shard, thats when this happens, but when I have the collection as a single shard, it works fine. Also tried spliting the single shard collection, but after spliting the data in the vector field automatically gets converted to list of strings from list of floats. So issue is only with multishard collection and not with single shard collection.

0

There are 0 best solutions below