abumarjikar commented on PR #4512:
URL: https://github.com/apache/solr/pull/4512#issuecomment-4756937366

   @dsmiley I audited the usage of `IndexSchema#NEST_PATH_FIELD_NAME ` as 
suggested, and here is where I updated the logic (and where I intentionally 
left it out):
   
   1. Updated `buildAllParentsFilterFromPath`: >   I replaced the manual, 
verbose `BooleanQuery` builder block for the root path (/ or empty) by directly 
delegating to my new `nestPathField.getType().getFieldQuery(this, 
nestPathField, "/") `logic. This completely removes the redundant manual 
construction of the "match all minus existence" pattern and unifies it under 
the new shortcut.
   
   2. Left `wrapWithParentPathConstraint` mostly as-is: >   I evaluated using 
the new `getFieldQuery` here, but for the non-`MatchAllDocsQuery` path, forcing 
the new method would have required nesting a structured BooleanQuery 
`([+MatchAllDocsQuery, -ExistenceQuery])` inside a `FILTER` or `MUST` clause. 
This would have introduced an unnecessary extra layer to Lucene's internal 
query tree structure. Keeping the `flat .add(newNestPathExistsQuery(), 
Occur.MUST_NOT)` here keeps the execution path flat and fast, matching Lucene's 
design patterns perfectly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to