pysolr
pysolr copied to clipboard
Add support for named nested documents
This patch adds support for named nested documents as supported by solr 8, as documented in the reference guide (XML example on page 378).
This in turn will support deeply nested documents as it enables the use of the new solr fields _nest_parent_ and _nest_path_, which enable new query functions.
It's no longer required to name child documents "_doc" or "_childDocument_", they can be any name just like any other tag. The original usage of "_doc" and "_childDocument_" remains usable as before.
Usage example:
solr.add([
{
"id": "doc_1",
"title": "A test document",
},
{
"id": "doc_2",
"title": "The Banana: Tasty or Dangerous?",
"comments": [
{ "id": "child_doc_1", "title": "peel" },
{ "id": "child_doc_2", "title": "seed" },
]
},
])
Codecov Report
Merging #271 into master will decrease coverage by
0.55%. The diff coverage is9.09%.
@@ Coverage Diff @@
## master #271 +/- ##
==========================================
- Coverage 94.1% 93.54% -0.56%
==========================================
Files 7 7
Lines 1306 1317 +11
==========================================
+ Hits 1229 1232 +3
- Misses 77 85 +8
| Impacted Files | Coverage Δ | |
|---|---|---|
| pysolr.py | 88.04% <9.09%> (-0.98%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update c24036f...d484afa. Read the comment docs.
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.
Can you rebase this against the current master branch and add some tests?
Please rebase.
@cokolbe Please rebase or close.
This was the only GitHub activity that this user had and they have not been active on the platform for many years.