Can parent-child relationship be used in this scenario?
Anyone?

I see it needs an update handler:
https://lucene.apache.org/solr/guide/6_6/transforming-and-indexing-custom-json.html#transforming-and-indexing-custom-json


curl 'http://localhost:8983/solr/my_collection/update/json/docs?split=/|/orgs'\
    -H 'Content-type:application/json' -d '{  "name": "Joe Smith",
"phone": 876876687,  "orgs": [    {      "name": "Microsoft",
"city": "Seattle",      "zip": 98052    },    {      "name": "Apple",
    "city": "Cupertino",      "zip": 95014    }  ]}'


On Tue, Apr 9, 2019 at 3:28 PM Shawn Heisey <apa...@elyograg.org> wrote:

> On 4/9/2019 2:04 PM, Abhijit Pawar wrote:
> > Hello Guys,
> >
> > I am trying to index a JSON array in one of my collections in mongoDB in
> > Solr 6.5.0 however it is not getting indexed.
> >
> > I am using a DataImportHandler for this.
> >
> > *Here's how the data looks in mongoDB:*
> > {
> >   "idStr" : "5ca38e407b154dac08913a96",
> >      "sampleAttr" : "sampleAttrVal",
> > *    "additionalInfo" : [ *
> > *        {*
> > *            "name" : "Manufacturer",*
> > *            "value" : "Videocon"*
> > *        }*
> > *    ]*
> > }
>
> That is not a structure that Solr knows how to handle.  Essentially what
> you have there is one document nested inside another.  Each of Solr's
> documents has a completely flat structure -- there is no possibility of
> a hierarchy within a single document.
>
> Solr does have support for parent/child documents, but it wouldn't be
> indexed like that.  I know almost nothing about how the parent/child
> document support works.  You would have to get help from someone else or
> consult the documentation.
>
> Thanks,
> Shawn
>

Reply via email to