You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jinsu Oh <he...@gmail.com> on 2014/04/29 03:20:10 UTC

Indexing an array of maps get transformed to a map

Our team is upgrading to solr 4.7.0 and running into an issue with
indexing an array of map objects in solr 4.7.0.

I understand that it makes no sense to index an array of map objects
to solr, but I want to figure out why certain error outputs are coming
out of the solr box.

So we have a document structure that goes something like:
{ id: 1234,
  url: abcd,
  modules: [ { id: 1, name: a} ]
}

When this goes through the solrj, I receive this error.

[http-bio-8080-exec-9] ERROR
org.apache.solr.servlet.SolrDispatchFilter  –
null:org.apache.solr.common.SolrException: Can't use
SignatureUpdateProcessor with partial update request containing
signature field: url

at org.apache.solr.update.processor.SignatureUpdateProcessorFactory$SignatureUpdateProcessor.processAdd(SignatureUpdateProcessorFactory.java:159)

at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:247)

at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:174)

For some reason, when the SignatureUpdateProcessorFactory receives the
update command, the solr document has become:
{ id: 1234,
  url: abcd,
  modules: {id: 1, name: a}
}. Then the processor thinks I'm sending a partial update, when I'm
trying to index a full document. :/

When I trace the code, I can see that I'm creating SolrInputDocument
with key 'modules' and value '[ { id: 1, name: 1} ]'. But when I call
Solrj to add to solr, the document values are transformed...

Does anyone know why this is happening?

-- 
Jinsu Oh