pysolr icon indicating copy to clipboard operation
pysolr copied to clipboard

Unable to store custom/nested JSON docs

Open yoavnash opened this issue 2 years ago • 0 comments

I have

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

Expected behaviour

I want to be able to store nested JSON document in solr, as described here: https://solr.apache.org/guide/solr/latest/indexing-guide/transforming-and-indexing-custom-json.html

Actual behaviour

It seems this is not possible at the moment.

Steps to reproduce the behaviour

  1. Run the following code:
solr.add([
    {
      "first": "John",
      "last": "Doe",
      "grade": 8,
      "exams": [
        {
          "subject": "Maths",
          "test"   : "term1",
          "marks"  : 90},
        {
          "subject": "Biology",
          "test"   : "term1",
          "marks"  : 86}
      ]
    }
])

Configuration

  • Operating system version: Ubuntu
  • Search engine version: solr:9.1.0
  • Python version: 3.8
  • pysolr version: 3.10.0b1

yoavnash avatar Jan 04 '23 14:01 yoavnash