You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2020/05/07 10:20:00 UTC

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

    [ https://issues.apache.org/jira/browse/SOLR-12865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101512#comment-17101512 ] 

Jan Høydahl commented on SOLR-12865:
------------------------------------

Have you tried the newest example for 8.x? https://lucene.apache.org/solr/guide/8_5/transforming-and-indexing-custom-json.html#indexing-nested-documents 

It looks like the example has been heavily re-worked since 7.5.

> 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
>          Components: documentation
>    Affects Versions: 7.5
>            Reporter: Alexandre Rafalovitch
>            Priority: Major
>              Labels: json
>
> 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
(v8.3.4#803005)

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