...
Code Block | ||||
---|---|---|---|---|
| ||||
////The source { //... "processingPipeline": [ //... { "splitter": { "scriptlang": "automatic_json", "script": "fullText.object, http://test/{1}/{2}, url, meta" } } //... ] //... } ////Would map the extracted document { "url": "blahurl", "title": "blah" "fullText": "<objects><object><meta>1</meta><url>blah1</url></object><object><meta>2</meta><url>blah2</url></object></objects>" } ////to the 2 derived docs: { "title": "blah (1)", "url": "http://test/blah1/1", "fullText": "<object><meta>1</meta><url>blah1</url></object>", "metadata": { "json": [ { "meta": "1", "url": "http://blah1" } ] } }, { "title": "blah (2)", "url": "http://test/blah2/2", "fullText": "<object><meta>1</meta><url>blah1</url></object>", "metadata": { "json": [ { "meta": "2", "url": "http://blah2" } ] } } ////Of course, subsequent pipeline elements can then manipulate/add fields other than "url" as per usual |
...