The archive search plugin is a great way of searching for content in archive or editorial repositories.
{
"id": "io.infomaker.archivesearch",
"name": "im-archivesearch",
"url": "https://plugins.writer.infomaker.io/v1/infomaker/im-archivesearch/{PLUGIN_VERSION}/index.js",
"style": "https://plugins.writer.infomaker.io/v1/infomaker/im-archivesearch/{PLUGIN_VERSION}/style.css",
"mandatory": false,
"enabled": true,
"data": {
"defaultSorting": "Updated",
"archiveHosts": [
{
"name": "Editorial - Images",
"host": {
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.editorial.oc.writer.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects",
"sortingsPath": "/opencontent/sortings"
},
"standardQuery": {
"contenttype": "Image"
},
"resultsMapping": {
"name": "WriterImageCaption",
"thumbnail": "thumbnail",
"url": "primary",
"credit": "WriterAuthors",
"caption": "WriterImageCaption",
"description": "WriterImageCaption",
"photoDate": "created",
"imageInstructions": "ImageInstructions"
},
"type": "editorial-opencontent"
},
{
"name": "Archive 1 - Images",
"host": {
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.archive-one.oc.writer.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects",
"sortingsPath": "/opencontent/sortings"
},
"standardQuery": {
"contenttype": "Image"
},
"resultsMapping": {
"name": "WriterImageCaption",
"thumbnail": "thumbnail",
"url": "primary",
"credit": "WriterAuthors",
"caption": "WriterImageCaption",
"description": "WriterImageCaption",
"photoDate": "created",
"imageInstructions": "ImageInstructions"
}
},
{
"name": "Editorial - PDF",
"host": {
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.editorial.dev.oc.writer.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects",
"sortingsPath": "/opencontent/sortings"
},
"standardQuery": {
"contenttype": "Graphic"
},
"resultsMapping": {
"fileName": "WriterFileName",
"title": "WriterGraphicTitle",
"text": "WriterGraphicText",
"objectName": "WriterObjectName",
"url": "primary"
},
"type": "editorial-opencontent"
}
]
}
}
Property | Type | Required | Description |
---|---|---|---|
defaultSorting | String | false |
Name of the OC sorting to be used as default sorting |
archiveHosts | Array | true |
Array containing query, and host configuration for OpenContent hosts. |
Archive Host Configuration Example:
{
"name": "Internal OC-Archive",
"host": { ... },
"standardQuery": { ... },
"resultsMapping": { ... }
"type": "..."
}
Property | Type | Required | Description |
---|---|---|---|
name | String | true |
Name for OC Host, displayed in drop down list of available OC Hosts. Short but descriptive. |
host | Object | true |
Descriptive label for Type, displayed in tab menu. |
standardQuery | Object | true |
Object containing properties used for every search-call to chosen OC Host. Requires contenttype property to function properly |
resultsMapping | Object | true |
Object used for mapping OC Properties to properties used by the plugin. See Results Mapping Options |
type | String | false |
Set to editorial-opencontent when searching for content in the Writer editorial repository |
Note: When type is editorial-opencontent, the content need to have thumbnail representations in Open Content
in order for them to be visible in the search result. This is a configuration option in Editor Service.
Host configuration used to fetch information and content.
{
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.editorial.dev.oc.writer.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects",
"sortingsPath": "/opencontent/sortings"
}
If a IMID protected proxy is used the "credentials": "include"
property MUST be set, if there is no IMID it MUST NOT be set, or set to omit
{
"credentials": "include",
"protocol": "https://",
"hostName": "xlibris.archive.dev.oc.writer.infomaker.io",
"port": "5555",
"healthPath": "/health",
"queryPath": "/search",
"objectPath": "/objects",
"sortingsPath": "/sortings"
}
Standard options used for every search call. Might be used for contenttype filtering, disabling faceting, or enabling only fetching latest version of a document.
See Open Content API documentation for available properties.
contenttype
is required to work correctly
{
"contenttype": "Image",
"latest": "true"
}
contenttype
Supported Values"contenttype": "Image"
will search for images"contenttype": "Graphic"
will search for PDF files"key: value"-object used for mapping properties used by the plugin to OpenContent properties. To customize the mapped values, change the string-value of the "value".
The "key"-strings used by the plugin are defined below. It is possible to map multiple keys to the same OC-property.
{
"name": "Filename",
"thumbnail": "thumbnail",
"url": "primary",
"credit": "Photographer",
"caption": "Caption",
"description": "Description",
"source": "ImageSource",
"photoDate": "Photodate"
}
Change Mapped OC-property
Example: To change the mapped value of description
from OC-property Description
to Text
:
{
"description": "Text"
}
The value of the description
-property will now get its value from the OC-property Text
.
One OC-property mapped to many keys
In this example, both properties caption
and description
will get its value from the OC-property Caption
.
{
"caption": "Caption",
"description": "Caption"
}
Content Type Image
Key | Plugin Use |
---|---|
name |
Displayed when viewing the big picture preview |
thumbnail |
Used for presenting the thumbnail of image |
url |
Url to original image binary. Used by plugin to upload archive image to current OC configuration, and to display big picture preview |
credit |
String crediting the image. Sets the credit -value of the created Image |
caption |
String used to set the caption -value of created Image |
description |
Displayed when viewing the big picture preview |
source |
String used by plugin to display the source of the image, alongside the credit-value |
photoDate |
Displayed when showing the big picture. Will be formatted to YYYY-MM-DD when rendered. |
Content Type Graphic (PDF)
Key | Plugin Use |
---|---|
objectName |
Used as label in results list |
title |
Used as sublabel in results list |
fileName |
Not visible in plugin |
url |
Url to original pdf binary. Used by plugin to upload archive pdf to current editorial OC |
To enable PDF searching, a new archiveHosts
item needs to be added with standardQuery.contenttype
set to "Graphic"
.
Example:
{
"name": "Editorial - PDF",
"host": {
"protocol": "https://",
"credentials": "include",
"hostName": "xlibris.editorial.oc.writer.infomaker.io",
"port": "7777",
"healthPath": "/opencontent/health",
"queryPath": "/opencontent/search",
"objectPath": "/opencontent/objects",
"sortingsPath": "/opencontent/sortings"
},
"standardQuery": {
"contenttype": "Graphic"
},
"resultsMapping": {
"fileName": "WriterFileName",
"title": "WriterGraphicTitle",
"text": "WriterGraphicText",
"objectName": "WriterObjectName",
"url": "primary"
},
"type": "editorial-opencontent"
}
Generates no direct output. Content in Archive Search Plugin is draggable and compatible with the Writer surface
and plugins which support content.