lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-7123) /update/json/docs should have nested document support
Date Thu, 09 Jun 2016 05:59:21 GMT

    [ https://issues.apache.org/jira/browse/SOLR-7123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321954#comment-15321954
] 

Noble Paul commented on SOLR-7123:
----------------------------------

There are 2 problems with the first command

1) There is no param called {{child.split}} anymore. So your "split" param should be {{split=split=/|/children|/children/grandchildren}}
2) The command line changes {{$FQN}} to an empty string because there is no environment variable
called {{FQN}}. So escape that as {{f=\$FQN:/**}}

> /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
>             Fix For: 6.1, master (7.0)
>
>         Attachments: NestedDocumentMapper.java, SOLR-7123-test.patch, SOLR-7123.patch,
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}
> split=/|/orgs&
> f=name:/orgs/name&
> f=city:/orgs/city&
> f=zip:/orgs/zip
> {noformat}
> * The objects at {{/org}} automatically becomes a child document because {{/org}} is
a child path of{{/}} 
> * All fields falling under the {{/orgs/}} will be mapped to the child document
> alternately you can just do
> {noformat}
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message