[
https://issues.apache.org/jira/browse/SOLR-7123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul updated SOLR-7123:
-----------------------------
Description:
It is the next logical step after SOLR-6304
For the example document given below where the /orgs belong to a nested
document,
{code}
{
name: 'Joe Smith',
phone: 876876687 ,
orgs :[ {name : Microsoft,
city: "Seattle,
zip: 98052},
{name: Apple,
city : Cupertino,
zip :95014 }
]
}
{code}
The extra mapping parameters would be
{noformat}
child.split=/orgs&
f=name:/orgs/name&
f=city:/orgs/city&
f=zip:/orgs/zip
{noformat}
* The objects at {{/org}} becomes a child document
* All fields falling under the {{/orgs/}} will be mapped to the child document
alternately you can just do
{noformat}
child.split=/orgs&f=$FQN:/**
{noformat}
The fully qualified name (FQN) for chiild docs begin from {{/org}}. So the
output would be
{noformat}
{
"name":"Joe Smith",
"phone":876876687,
"_childDocuments_":[
{
"name":"Microsoft",
"city":"Seattle",
"zip":98052},
{
"name":"Apple",
"city":"Cupertino",
"zip":95014}]}
{noformat}
was:
It is the next logical step after SOLR-6304
For the example document given below where the /orgs belong to a nested
document,
{code}
{
"name": "Joe Smith",
"phone": 876876687
"orgs" :[ {" name" : "Microsoft",
"city": "Seattle",
"zip": 98052},
{"name": “Apple”,
"city":”Cupertino”,
"zip":"95014" }
]
}
{code}
The extra mapping parameters would be
{noformat}
child.split=/orgs&
f=name:/orgs/name&
f=city:/orgs/city&
f=zip:/orgs/zip
{noformat}
* The objects at {{/org}} becomes a child document
* All fields falling under the {{/orgs/}} will be mapped to the child document
alternately you can just do
{noformat}
child.split=/orgs&f=$FQN:/**
{noformat}
The fully qualified name (FQN) for chiild docs begin from {{/org}}. So the
output would be
{noformat}
{
"name":"Joe Smith",
"phone":876876687,
"_childDocuments_":[
{
"name":"Microsoft",
"city":"Seattle",
"zip":98052},
{
"name":"Apple",
"city":"Cupertino",
"zip":95014}]}
{noformat}
> /update/json/docs should have nested document support
> -----------------------------------------------------
>
> Key: SOLR-7123
> URL: https://issues.apache.org/jira/browse/SOLR-7123
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Labels: EaseOfUse
> Attachments: NestedDocumentMapper.java, SOLR-7123.patch
>
>
> It is the next logical step after SOLR-6304
> For the example document given below where the /orgs belong to a nested
> document,
> {code}
> {
> name: 'Joe Smith',
> phone: 876876687 ,
> orgs :[ {name : Microsoft,
> city: "Seattle,
> zip: 98052},
> {name: Apple,
> city : Cupertino,
> zip :95014 }
> ]
> }
> {code}
> The extra mapping parameters would be
> {noformat}
> child.split=/orgs&
> f=name:/orgs/name&
> f=city:/orgs/city&
> f=zip:/orgs/zip
> {noformat}
> * The objects at {{/org}} becomes a child document
> * All fields falling under the {{/orgs/}} will be mapped to the child document
> alternately you can just do
> {noformat}
> child.split=/orgs&f=$FQN:/**
> {noformat}
> The fully qualified name (FQN) for chiild docs begin from {{/org}}. So the
> output would be
> {noformat}
> {
> "name":"Joe Smith",
> "phone":876876687,
> "_childDocuments_":[
> {
> "name":"Microsoft",
> "city":"Seattle",
> "zip":98052},
> {
> "name":"Apple",
> "city":"Cupertino",
> "zip":95014}]}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]