Table of Contents
About Squirro Items
When executing a search, Squirro will show the user a list of matching items as the query result.
When planning and integrating a custom data source the following points should be considered:
- What is the smallest independent result entity that the user should be consuming? These should then be modeled as Squirro items.
- The formatting of the body content and title.
Some examples for individual items are:
- News story, web article, tweet, etc.
- Binary document (PDF, Office documents, etc.)
- Service ticket
- Chat message
Items can also contain sub-items which are always shown in the context of the full item. Typically Squirro uses these sub-items for indexing the individual pages or chapters of PDF documents as separate sub-items.
The fields in this table are used in both the data loading and data consumption APIs.
|link||URL||Link to the item at its original location.|
|body||HTML String||Item body. This field is in HTML format and special characters need to be escaped.|
|language||Language Codes||Content language of the item. If this is not specified, it is auto-detected based on the content.|
|created_at||Date 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:
Main item picture. This image is displayed in the result list to represent the story.
For data loading, the
If this is not set, it is automatically extracted from the web site specified with the
|webshot_height||Integer||Height of the webshot in pixels.|
|webshot_width||Integer||Width of the webshot in pixels.|
|keywords||Dictionary, values represented as lists|
Keywords attached to the item (see Facets for full documentation). They are the structured information of an item.
Keyword values can have different data types. Please reference the Data Types section of the Facets documentation for details and format specification. The default data type is string. To use other formats, configure it before loading any data into the system. See Facets API for information.
Example item with keywords:
The geographical location for the item. This is stored as a two-element list of floats, representing the latitude and longitude. To query by location the List Items resource has a
|comments||List 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:
|files||List 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:
When importing data into Squirro at least one of the fields
files must be set. All other fields are optional.
Data Loading Fields
These fields can be specified in the data loading APIs. They will be transformed and output with different names in the data consumption APIs.
External item identifier. When a value is specified here at import, it is written into the
Item summary text. If not specified, this is generated from the
Main item picture. If this URL exists and can be downloaded, the image is archived by Squirro. The resulting URL is written into the
Note: processing of webshots is disabled by default for custom data imports (bulk provider).
|mime_type||String||The MIME type of the body. Set to |
Data Consumption Fields
Some fields are only available during data consumption because they are calculated on the fly or represent a user state. This table documents these fields.
Internal item identifier, generated by Squirro only.
External item identifier. The external identifier is used for deduplication and can be used to link items to their source system.
|read||Boolean||True if the item has been read.|
|starred||Boolean||True if the item has been starred.|
Item abstract. This is generated from the
In case the item is returned as a matching result to a query search, the abstract is calculated around the most relevant matching keywords.
|score||Float||Relevant score of the item. This is only set when the result list is ordered by relevance.|
|thumbler_url||Partial URL||Used internally by Squirro to display thumbnails of the |
Returned for items when the
Returned when the
A dictionary of matching query terms per field.
|matching_sub_items||List||List of sub-items (e.g. pages for a PDF) with matches for the current query.|
|has_matching_sub_items||Boolean||True if the item consists of sub-items (e.g. pages for a PDF) that matches the current query.|
Returns a list of subscription details.
Returns a list of object details.