Come aggiornare più documenti in Solr 4.5.1 con JSON? Ho provato questo ma non funziona:Come aggiornare più documenti in Solr con JSON?
POST /solr/mycore/update/json
:
{
"commit": {},
"add": {
"overwrite": true,
"doc": [{
"thumbnail": "/images/404.png",
"url": "/404.html?1",
"id": "demo:/404.html?1",
"channel": "demo",
"display_name": "One entry",
"description": "One entry is not enough."
}, {
"thumbnail": "/images/404.png",
"url": "/404.html?2",
"id": "demo:/404.html?2",
"channel": "demo",
"display_name": "Another entry",
"description": "Another entry is required."
}
]
}
}
Grazie. Questo è un formato JSON non valido, giusto? Non c'è possibilità di produrre questo output ma farlo codificare a mano. – burnersk
Passa alcuni validatori online, ma http://www.freeformatter.com/json-validator.html spiega che "L'input JSON NON è valido secondo RFC 4627 (specifica JSON). Chiave duplicata inaspettata: aggiungi alla posizione 136. " – CoDEmanX