Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Additional fields documentation

...

FieldData typeDescription
idUnique Identifier

While this field is called the same in data loading and consumption, it has different semantics. See the sections Data Loading Fields and Data Consumption Fields for details.

linkURLLink to the item at its original location.
titleStringItem title.
bodyHTML StringItem body. This field is in HTML format and special characters need to be escaped.
languageLanguage CodesContent language of the item. If this is not specified, it is auto-detected based on the content.
created_atDate and Time

Item creation date. Ideally this is the creation date of the item in its source system.

If this is not specified for data loading, the import process goes through the following steps:

  • If the files property is specified, Squirro tries to extract a creation date from the file metadata.
  • As a fallback the server's current date and time is used.
webshot_urlURL

Main item picture. This image is displayed in the result list to represent the story.

For data loading, the webshot_picture_hint field should be used, because the picture will then automatically be archived.

If this is not set, it is automatically extracted from the web site specified with the link property, generally by using the first story picture.

webshot_heightIntegerHeight of the webshot in pixels.
webshot_widthIntegerWidth of the webshot in pixels.
keywordsDictionary, values represented as lists

Keywords attached to the item. They are the structured information of an item.

Example item with keywords:

Code Block
languagejs
{
  "title": "Our offices",
  "body": "We have offices in Munich, …",
  "keywords": {
    "country": ["Germany"],
    "city": ["Munich", "Berlin"]
  }
}
location (question)  
comments  
files  Two-element list

The geographical location for the item. This is stored as a two-element list of floats, representing the latitude and longitude.

Example:

Code Block
languagejs
{
  "title": "Our offices",
  "body": "We have offices in Munich, …",
  "location": [48.1059422, 11.5668324]
}
commentsList of dictionaries.

A list of comments that are attached to the item. The user can toggle the display of these comments in the web interface on top of the item body. Three fields can be added to comments:

FieldDescription
idExternal identifier of the comment. This field is mandatory.
typeType of the comment. The type twitter is treated specially, for all other types no special handling has been implemented.
body

Comment body. This field is in HTML format and special characters need to be escaped.

If the type has been set to twitter, this needs to be a valid embedded tweet (without the script tags).

filesList of dictionaries.

A list of files that are uploaded for the item. Note: this is modeled as a list, but only one file can currently be attached.

The fields for individual files are:

FieldDescription
contentBase64-encoded content of the file to upload. This or the url field are mandatory.
urlURL where the file can be downloaded from. This or the content field are mandatory.
nameFile name without path. Mandatory when the content field is provided. If the url field is provided, the name is derived from the URL by default.

When importing data into Squirro at least one of the fields titlebody or files must be set. All other fields are optional.

...

FieldData typeDescription
idUnique Identifier

Internal item identifier, generated by Squirro only.

external_idString

External item identifier. See the id field in the data loading fields for details.

readBooleanTrue if the item has been read.
starredBooleanTrue if the item has been starred.
abstractText String

Item abstract. This is generated from the summary field, or if that field doesn't exist, from the body.

In case the item is returned as a matching result to a query search, the abstract is calculated around the most relevant matching keywords.

scoreFloatRelevant score of the item. This is only set when the result list is ordered by relevance.
thumbler_urlPartial URLUsed internally by Squirro to display thumbnails of the webshot_url field.
explanationDictionary

Returned for items when the explain_smartfilters option is used in the Get Item resource. The dictionary contains a list of fields, for each of which the matching Smart Filter tokens are listed.

Example:

Code Block
languagejs
{
  …
  "explanation
  related_items  
": {
    "matches": {
      "summary.stemmed": [
        {"term": "eliminated", "score": 0.010479515},
        {"term": "equipped", "score": 0.00846127}
      ],
      "body.stemmed": [
        {"term": "eliminated", "score": 0.010341313000000001},
        {"term": "equipped", "score": 0.008302803000000001}
      ],
      "language_code": [
        {"term": "en", "score": 0.0009886466000000001}
      ]
    }
  }
}
related_itemsList

Returned when the filter_related_items option is set in the List Items resource. A list of dictionaries which contain the field id of any related (duplicate) items.

Example:

Code Block
languagejs
{
  …
  "related_items": [
    {"id": "UfA8Ah08TeSLSUo-RBzm7Q"},
    {"id": "tjiS4mjaTgupKaIiZisYww"}
  ]
}
sub_items  
highlight_matches  
matching_sub_items  
has_matching_sub_items  

 

explain_smartfilters