forked from apache/lucene-solr
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAPI-571 Fix SolrJ Bind Nested Child DTO Fields
The current solrj Document DTO to SolrInputDocument binder treat all child docs as anonymous rather than prefix them with the given path. This will result in the document being indexed without the `_nest_path_` field populated which is required for the ChildDocumentTransformer (`fl=[child]`) to work. Add a new property to `@Field` interface to determine if a `Field` annoted with `child=true` should be treated as anonymous field or if it should be treated as a nested child document. Where they should be nested child docs, each nested object would be converted to its own `SolrInputDocument` and added as a regular field to the parent `SolrInputDocument`. Having it as a regular field with nested objects will result in Solr indexing these child docs correctly, and it will populate appropriate nested child docs fields during index time. We can now have more that one child documents fields listed in the DTO until they are set and `anonymizeChild=false`.
- Loading branch information
1 parent
d06ab17
commit 9481840
Showing
3 changed files
with
171 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters