...
In the following example using "splitsplitter", Follow Web Links has been configured to act on JSON/XML endpoints. Metadata is extracted from the endpoints, which is then used to generate new documents. deleteExisting
is set to True to delete the originals.
...
Code Block |
---|
{ "contentMetadata": [{ "fieldName": "json", "index": false, "script": "var json = eval('('+text+')'); json; ", "scriptlang": "javascript", "store": true }], "display": "Convert the text into a JSON object in the document's metadata field: _doc.metadata.json[0]" }, { "display": "Take the original documents, split them using their metadaata into new documents, and then delete the originals", "splitter": { "deleteExisting": true, "script": "var urls = []; create_links( urls, _metadata.json[0].data ); urls;", "scriptflags": "m", "scriptlang": "javascript" } } |
Page by Page Analysis of E-Book
In this example, the individual pages of an E-Book are ingested into infinit.e and then split into individual documents using "splitter." The original document is then deleted.
Code Block |
---|
{ "display": "Take the individual pages from the first doc's metadata, split them into new documents, and then delete the original",
"splitter": {
"deleteExisting": true,
"numPages": 10,
"numResultsPerPage": 1,
"script": "var docs = convert_to_docs(_doc.metadata['pages'], _doc); docs;",
"scriptflags": "d",
"scriptlang": "javascript"
} |
Panel |
---|
Footnotes: Legacy documentation: Legacy documentation: |
...