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

add() does not work properly with nested documents in solr 8 #270

Open
3 tasks done
cokolbe opened this issue Jul 10, 2019 · 5 comments
Open
3 tasks done

add() does not work properly with nested documents in solr 8 #270

cokolbe opened this issue Jul 10, 2019 · 5 comments
Labels

Comments

@cokolbe
Copy link

cokolbe commented Jul 10, 2019

I have

  • Tested with the latest release
  • Tested with the current master branch
  • Searched for similar existing issues

When adding nested documents with pysolr, it is required to name these child documents "_doc", as per pysolr's usage example. However, since solr 8 it is also possible to explicitly name child documents (Example in the solr reference guide, page 378). This does not appear to be possible with pysolr.

The issue is that this is required for the new fields nest_path and nest_parent (solr reference guide, page 377), which are used for various new features, most importantly the proper retrieval of deeply nested documents (examples at solr reference guide, page 619 f.).

When nested documents (named "_doc") are added with pysolr.add(), neither the nest_path nor nest_parent fields will be filled out by solr, and as such the features using these fields will not work.

When nested documents (given any other name) are added with pysolr.add(), the nested documents/dictionaries will be treated like a single string, so no nesting will happen at all.

Configuration

  • Operating system version: debian 9.9
  • Search engine version: solr 8.1.1
  • Python version: 3.5.3
  • pysolr version: 3.8.1
@cokolbe
Copy link
Author

cokolbe commented Jul 12, 2019

I've created a pull request to fix this issue.

@stale
Copy link

stale bot commented Oct 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 10, 2019
@vstollen
Copy link

Are named child documents supported by now?
If not I'll gladly help to rebase #271 against the main branch and create a new pull request, although I'm not too familiar with pysolr and it's test suite.

@spyk
Copy link

spyk commented Nov 25, 2021

I am getting the same issue with pysolr latest version. I guess this is still unresolved. Is it a matter of rebasing and adding tests? Not too familiar myself with pysolr's test suite.

@alishah730
Copy link

its still same with 3.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants