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

David Smiley commented on SOLR-12441:
-------------------------------------

A more concrete straw-man proposal is as follows:  In 
{{SolrCore.loadUpdateProcessorChains()}} conditionally add a new 
NestedUpdateProcessorFactory immediately prior to RunUpdateProcessorFactory.  
In NestedUpdateProcessorFactory.getInstance(), conditionally wrap the 
RunUpdateProcessorFactory dependent on the 
{{indexSchema.isUsableForChildDocs()}}.  This proposal is for 8.0.  
NestedUpdateProcessorFactory would add "\_root\_" in this plan.  If we all 
generally agree with this, such a proposal would be its own issue and not this 
one, I think.

If someone doesn't want nested docs, then they shouldn't define "_root_" in the 
schema.  There are now other fields to deal with as well though -- like 
\_nestPath\_ and \_nestParent\_ -- where should these be defined?  We could 
simply add these in the schema by default.  NestedUpdateProcessorFactory could 
simply look at the schema for their existence to see if it should populate 
these (or not) instead of bothering with any configuration of the URP -- thus 
it's easier and more automatic.  It is kinda a shame that a from-scratch schema 
would require adding a bunch new fields but ah well.

> Add deeply nested documents URP
> -------------------------------
>
>                 Key: SOLR-12441
>                 URL: https://issues.apache.org/jira/browse/SOLR-12441
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: mosh
>            Assignee: David Smiley
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> As discussed in 
> [SOLR-12298|https://issues.apache.org/jira/browse/SOLR-12298], there ought to 
> be an URP to add metadata fields to childDocuments in order to allow a 
> transformer to rebuild the original document hierarchy.
> {quote}I propose we add the following fields:
>  # __nestParent__
>  # _nestLevel_
>  # __nestPath__
> __nestParent__: This field wild will store the document's parent docId, to be 
> used for building the whole hierarchy, using a new document transformer, as 
> suggested by Jan on the mailing list.
> _nestLevel_: This field will store the level of the specified field in the 
> document, using an int value. This field can be used for the parentFilter, 
> eliminating the need to provide a parentFilter, which will be set by default 
> as "_level_:queriedFieldLevel".
> _nestLevel_: This field will contain the full path, separated by a specific 
> reserved char e.g., '.'
>  for example: "first.second.third".
>  This will enable users to search for a specific path, or provide a regular 
> expression to search for fields sharing the same name in different levels of 
> the document, filtering using the level key if needed.
> {quote}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to