You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2018/10/13 20:04:00 UTC

[jira] [Created] (SOLR-12865) Custom JSON parser's nested documents example does not work

Alexandre Rafalovitch created SOLR-12865:
--------------------------------------------

             Summary: Custom JSON parser's nested documents example does not work
                 Key: SOLR-12865
                 URL: https://issues.apache.org/jira/browse/SOLR-12865
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 7.5
            Reporter: Alexandre Rafalovitch


The only exam we have for indexing nested JSON using JSON parser does not seem to work: [https://lucene.apache.org/solr/guide/7_5/transforming-and-indexing-custom-json.html#indexing-nested-documents]

Attempt 1, using default schemaless mode:
 # bin/solr create -c json_basic
 # Example command in V1 format (with core name switched to above)
 # Indexing fails with: *"msg":"[doc=null] missing required field: id"*. My guess it is because the URPs chain do not apply to inner children records

Attempt 2, using techproducts schema configuration:
 # bin/solr create -c json_tp -d sample_techproducts_configs
 # Same example command with new core
 # Indexing fails with: *"msg":"Raw data can be stored only if split=/"* (due to presence of srcField in the params.json)

Attempt 3, continuing the above example, but taking out srcField configuration:
 # Update params.json to remove srcField
 # Same example command
 # It indexes (but not commits)
 # curl http://localhost:8983/solr/json_tp/update/json -v -d '\{commit:{}}
 # The core now contains only one document with auto-generated "id" and "_version_" field (because we have mapUniqueKeyOnly in params.json)

Attempt 4, removing more keys
 # Update params.json to remove mapUniqueKeyOnly
 # Same example command
 # Indexing fails with: *"msg":"Document is missing mandatory uniqueKey field: id"*

There does not seem to be way to index the nested JSON using the transformer approach.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org