...
| Code Block |
|---|
{
"display": string,
"docMetadata": {} // see DocumentSpecPojo below
}
//////////////////////////////////
public
static class DocumentSpecPojo {
public String title; "title":string,// The string expression or $SCRIPT(...) specifying the document title
public String description; "description":string,// The string expression or $SCRIPT(...) specifying the document description
public String publishedDate; "publishedDate":string,// The string expression or $SCRIPT(...) specifying the document publishedDate
public String fullText; "fullText":string,// The string expression or $SCRIPT(...) specifying the document fullText
public String displayUrl; "displayUrl":string,// The string expression or $SCRIPT(...) specifying the document displayUrl
public Boolean appendTagsToDocs; "appendTagsToDocs":Boolean,// if true (*NOT* default) source tags are appended to the document
public StructuredAnalysisConfigPojo.GeoSpecPojo geotag; // "geotag" {config_param_name"}//Specify a document level geo-tag
}
|
...
Description
You can use docMetadata to set specific values for a document's metadata. docMetadata has the following parameters
| Parameter | DescriptionNote | ||
|---|---|---|---|
title | The string expression or $SCRIPT(...) | ||
description | Ibid. | ||
publishedDate | Ibid. | ||
fullText | Ibid. | ||
displayUrl | "displayUrl" sets the corresponding document JSON field. It is guaranteed not to be used by the Infinit.e platform. It is therefore useful for linking documents to external content. For reference, the way that it is used in the Infinit.e GUI is as follows:
| ||
appendTagsToDocs | If true (*NOT* default) source tags are appended to the document. | ||
geoTag | using geo tag the following is possible
See example below. |
Setting Metadata Values
When document metadata is extracted from a source (via the File, Database, or other technique), each field extracted is captured in the Feed.metadata object. Using document metadata, data stored in the Metadata object can be access using the $ operator to signify that we are attempting to retrieve data from a field in our document.
...
| Info |
|---|
Note: When iterating over entities or metadata (for either entity or association building), the "$" sign is relative to the iterator, not the document (eg the metadata object being looped over). However when iterating over metadata fields that are strings, then the above document-level referencing is still valid, or "$value"/"${value}" can be used to reference the value itself. |
...
"Office"
...
Documents Example
In this example, the subject line of an email correspondence can be extracted by Document metadata and set as the title of the resulting document.
...