Hi,
I'm using nifi to index Solr. Using processor PutSolrRecord and an avro
schema like the following
{
"type": "record",
"name": "names",
"namespace": "empty",
"fields": [
{"name": "id" , "type" : "string"},
{"name": "title" , "type" : "string"},
{"name": "vector", "type":{"type": "array","items": "double","default":
[]}}
]
}
I'm trying to add json objects (after enrichment process) like the
following:
{"id":103916261,
"title":"LPN - Med Surg, BHU, Inpatient Rehab - $1500 Sign On Bonus",
"vector":[-0.018120551481842995,0.02825242280960083,-0.01975410059094429,0.06464432924985886]
}
But in Solr I get errors like :
ERROR: [doc=103916261] Error adding field
'vector'='[[Ljava.lang.Object;@2901860c,....]', expected format:'[f1, f2,
f3...fn]' e.g. [1.0, 3.4, 5.6]
It seems the serialization is wrong but I'm not sure how to fix it, is
anyone able to help?
The Vector is a DenseVector type in Solr.
Thanks
Dan