Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAPI-571 Fix SolrJ Bind Nested Child DTO Fields #63

Open
wants to merge 1 commit into
base: bw_branch_8_11_2
Choose a base branch
from

Conversation

yfernando-bw
Copy link

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.

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`.
@yfernando-bw yfernando-bw force-pushed the CAPI-571-fix-bind-nested-child-dto-fields branch from 9481840 to 9f91ba9 Compare February 5, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant