[
https://issues.apache.org/jira/browse/SOLR-6304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099421#comment-14099421
]
Ingo Renner edited comment on SOLR-6304 at 8/16/14 1:04 AM:
------------------------------------------------------------
Just read the article on searchhub for this issue [1]. If echo is meant for
debugging purposes and doesn't create documents, wouldn't it make more sense to
call the parameter 'debug' or 'dryrun'?
[1] http://searchhub.org/2014/08/12/indexing-custom-json-data/
was (Author: ingorenner):
Just read the article on search for this issue [1]. If echo is meant for
debugging purposes and doesn't create documents, wouldn't it make more sense to
call the parameter 'debug' or 'dryrun'?
[1] http://searchhub.org/2014/08/12/indexing-custom-json-data/
> Transforming and Indexing custom JSON data
> ------------------------------------------
>
> Key: SOLR-6304
> URL: https://issues.apache.org/jira/browse/SOLR-6304
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
> Fix For: 5.0, 4.10
>
> Attachments: SOLR-6304.patch, SOLR-6304.patch
>
>
> example
> {noformat}
> curl
> localhost:8983/update/json/docs?split=/batters/batter&f=recipeId:/id&f=recipeType:/type&f=id:/batters/batter/id&f=type:/batters/batter/type
> -d '
> {
> "id": "0001",
> "type": "donut",
> "name": "Cake",
> "ppu": 0.55,
> "batters": {
> "batter":
> [
> { "id": "1001", "type":
> "Regular" },
> { "id": "1002", "type":
> "Chocolate" },
> { "id": "1003", "type":
> "Blueberry" },
> { "id": "1004", "type":
> "Devil's Food" }
> ]
> }
> }'
> {noformat}
> should produce the following output docs
> {noformat}
> { "recipeId":"001", "recipeType":"donut", "id":"1001", "type":"Regular" }
> { "recipeId":"001", "recipeType":"donut", "id":"1002", "type":"Chocolate" }
> { "recipeId":"001", "recipeType":"donut", "id":"1003", "type":"Blueberry" }
> { "recipeId":"001", "recipeType":"donut", "id":"1004", "type":"Devil's food" }
> {noformat}
> the split param is the element in the tree where it should be split into
> multiple docs. The 'f' are field name mappings
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]