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 Igor Littig <ig...@gmail.com> on 2013/05/30 21:46:33 UTC
indexing documents
Good day everyone.
I recently faced another problem. I've got a bunch of documents to index.
The problem, that they in the same time database for another application.
These documents stored in JSON format in the following scheme:
{
"id": 10,
"name": "dad 177",
"cat":[{
"id":254,
"name":"124"
}]
}
When I'm trying to post them, I get the following error:
ERROR org.apache.solr.core.SolrCore –
org.apache.solr.common.SolrException: Unknown command: id [8]
Is there a way to index these documents without changing ? How can i
modify the schema or I need to do something else ?
Re: indexing documents
Posted by Erick Erickson <er...@gmail.com>.
Solr JSON isn't intended to index arbitrary JSON, and especially not
intended to index nested documents. I suspect your issue is that
"cat" has an array of name/value pairs that Solr doesn't understand.
So no, I don't think you can index these docs without putting them into
a form Solr understands.
Best
Erick
On Thu, May 30, 2013 at 3:46 PM, Igor Littig <ig...@gmail.com> wrote:
> Good day everyone.
>
> I recently faced another problem. I've got a bunch of documents to index.
> The problem, that they in the same time database for another application.
> These documents stored in JSON format in the following scheme:
>
> {
> "id": 10,
> "name": "dad 177",
> "cat":[{
> "id":254,
> "name":"124"
> }]
> }
>
> When I'm trying to post them, I get the following error:
>
> ERROR org.apache.solr.core.SolrCore –
> org.apache.solr.common.SolrException: Unknown command: id [8]
>
> Is there a way to index these documents without changing ? How can i
> modify the schema or I need to do something else ?