Hello all,
I’ve got a DenseVectorField with default FLOAT32 vectorEncoding that I’m
storing embeddings in. I recently started testing a new model that returns an
array of Doubles as opposed to Floats. If I try update a doc with the array of
Doubles using JSON I get the error below, however if I use the exact same array
but in XML format the values are converted to FLOAT32 just fine OR if I
stringify all of the entries and pass a JSON array of Strings it works fine too.
Is this by design?
Thanks,
Aaron
org.apache.solr.common.SolrException:
ERROR: [doc=184013!2] Error adding field 'vector'='[8.101463317871094E-4,
-0.0276336669921875, 0.0099029541015625,...,-0.00701141357421875,
-0.08013916015625, -0.015625]'
Caused by:
org.apache.solr.common.SolrException:
Error while creating field
'vector{type=knn_vector,properties=indexed,stored,omitNorms,omitTermFreqAndPositions,useDocValuesAsStored}'
from value '[8.101463317871094E-4, -0.0276336669921875, 0.0099029541015625,...
-0.00701141357421875, -0.08013916015625, -0.015625]'
Caused by:
java.lang.ClassCastException: class java.lang.String cannot be cast to class
java.lang.Number (java.lang.String and java.lang.Number are in module java.base
of loader 'bootstrap')
N.B.
- I truncated the vectors, they’re 1024 in length.
- I have the full trace if that would help, just didn’t want to clutter up
mailboxes.
INTERNAL
INTERNAL