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

David Smiley commented on SOLR-12362:
-------------------------------------

To be clear, this patch thus far seems to be focused on "Solr-Style JSON" 
https://lucene.apache.org/solr/guide/7_3/uploading-data-with-index-handlers.html#uploading-data-with-index-handlers
  (alas I don't like that name)  and not custom JSON.   Will this issue address 
both or do you think Custom JSON warrants a separate issue?

*For Solr-Style JSON*: Unfortunately the Solr Ref Guide doesn't show the 
atomic/partial update syntax.  Here's an excerpt:
{code:json}
[{'id':'1', 'val_s':{'add':'foo'}}]
{code}

Assuming that all documents must have the uniqueKey field, I think we can 
simply look for the presence of that key in the child JSON object?  Technically 
uniqueKey is optional but if it's undefined then child documents (and many/most 
Solr features) don't work any way.  I think it's more complicated to go the 
path you did by trying to know the atomic update verbs and other special keys.  
There would be issues if someone oddly chooses a uniqueKey matching "value" or 
one of these update verbs but that'd be a pretty weird choice.  Perhaps long 
term Solr ought to lock down "id" for the official uniqueKey as a simplifying 
decision.

*For custom JSON*, I think we can explicitly call out these child documents by 
having the path show up in the {{split}} param.  It seems this is already 
supported though we need to retain the semantic key and decide when we add this 
semantic key or when not (make anonymous).  If we view anonymous children as 
old/deprecated to be removed, then we can just have a flag for this, one that 
is boolean one way in 7x but the other in master (8x).

> JSON and XML loaders should save the relationship of children
> -------------------------------------------------------------
>
>                 Key: SOLR-12362
>                 URL: https://issues.apache.org/jira/browse/SOLR-12362
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: mosh
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Once _childDocuments in SolrInputDocument is changed to a Map, the JsonLoader 
> and XmlLoader should add the child document to the map while saving its key 
> name, to maintain the child's relationship to its parent.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to