Méthode Swing Search is an important component that allows to perform searches in different domains (EOMDB, Web…​) and it is highly extendable.

To completely disable the search function, configure the "disabled" parameter at true as following.

<search>
    <disabled>true</disabled>
</search>

Generic Search Configuration

  • disableResultsPreview [true | false (default)] - If true, it disables the search preview results (so that all queries are viewed directly in the Explorer area, if it’s available).

It works only for EOMDB searches, so other searches will be previewed as always.
  • itemClickAction [preview (default) | select] - It define the click action performed on resultset items:

    • preview - Clicking on the item displays its preview.

    • select - Clicking on the item selects it. Multi-selection is available. It enables drag and drop of single or multiple items to any editor, where allowed. Double click performs item preview.

  • hideFilterOnSearch [true | false (default)] - It allows to automatically hide custom filters performing a search when the Search panel is pinned in the binder.

  • executeQueryAutomatically [true (default) | false] - It allows to choose whether to execute the custom queries automatically or not.

  • customQueries - It defines a fixed set of "custom queries" available in the top-left dropdown. This offer a practical shortcut to the most common used queries.

It is also possible to insert the query path using the id property even in case of path.
  • databaseIndexes - It gives the user the possibility to specify the default index in which the default-folder filter. See Custom filters documentation for further info on the default-folder filter.

Configuration example:

<search>
    <disableResultsPreview>true</disableResultsPreview>
    <itemClickAction>select</itemClickAction>
    <hideFilterOnSearch>true</hideFilterOnSearch>
    <executeQueryAutomatically>false</executeQueryAutomatically>

    <customQueries>
        <customQuery>
            <id>199$0.1321231231</id>
            <name>First query</name>
        </customQuery>
        <customQuery>
            <id>/Globe/Query/MY_QUERY</id>
            <name>Second query (with path)</name>
        </customQuery>
    </customQueries>

    <databaseIndexes>
        <databaseIndex>
            <name>Editorial</name>
            <index>Production@meth01_eomjse1;Wires@meth01_eomjse1</index>
        </databaseIndex>
        <databaseIndex>
            <name>Archive</name>
            <index>Archive@meth02_eomjse1</index>
        </databaseIndex>
    </databaseIndexes>
    <!-- ... -->
</search>

Column catalog configuration

Inside the search configuration, for EOMDB domains, it is possible to configure multiple column catalogs for the results shown in the Swing Explorer View.

<search>
    <!-- ... -->
    <allowMultipleColumnCfg>true</allowMultipleColumnCfg>
    <defaultColumnCfg>methodeResultSetList</defaultColumnCfg>
    <catalogs>
        <catalog>methodeResultSetList</catalog>
        <catalog>methodeResultSetThumbnails</catalog>
        <catalog>SwingResultSet</catalog>
    </catalogs>
</search>
  • allowMultipleColumnCfg [true | false (default)] - If true, the "Explore" button in the search is a dropdown and lists all the configured column catalogs.

  • defaultColumnCfg ["methodeResultSetList"] - This is the column catalog used when the user clicks on the "Explore" button. Beware that each domain can override the default by providing a different defaultColumnCfg.

  • catalogs - It’s a list of available columnCatalog names that will appear in the dropdown. Beware that each domain can override the default by providing a different set of catalogs.

Domain configuration

As far as the Search configuration is concerned, for the parameters found under the <domain> key, no merge will be applied and the hierarchy to be respected is the usual one:
User > Group > SysConfig

Search configuration is included within a single search object:

<search>
    <domains>
        <domain>...</domain>
        <domain>...</domain>
        <domain>...</domain>
    </domains>

It is possible to search within different search domains. Supported domains are:

  • EOMDB - Internal database search

  • Web - Search on different services ( their availability depends on the APIs. Support for the API may drop without warning )

  • Contacts - Search within Méthode users.

  • Pinboard - Search within the Pinboard.

  • Social (if available) - Search in Social networks.

  • Custom - Custom search domains specified by the user.

Only EOMDB and Web domains are customizable.

Disable specific domains - It is possible to disable the different searches by setting the specific privileges ( "_PadmaPriv_enableSearchExternalSource", "_PadmaPriv_enableSearchContacts", "_PadmaPriv_enableTemporaryPinboard" )

General domain properties

Each domain has the following properties:

Table 1. Domain configuration: properties
Name Description Values

name

Domain name. Must be unique and without spaces.

type

Domain type. NOTE: there can be multiple EOMDB domains, while it is suggested to have a unique Web domain.

eomdb / web

connectionName

Used only by EOMDB domains, indicates the connection name configured in the MRAS configuration. For backward compatibility the previous <repositoryId> and <repositoryName> is correctly read anyway.

defaultColumnCfg

Used to override the default search defaultColumnCfg property.

showMetadata

Used only by EOMDB domains, if true the results will also contain the "attributes" property. Be aware that this will slow down the search.

false

hidden

If true, domain is hidden from the search

true / false

defaultFor

If specified, in case of specific searches ( e.g. search from image or video placeholder ), the domain with the corresponding searchType will be selected.

image / video

groupResults

For EOMDB domains, if true the results are grouped and sorted according to the type

true / false

label

The domain label

icon

Default icon for the domain

view

For EOMDB databases, it is possible to specify a custom ColumnCatalog. By default, the column catalog is "SwingResultSet" (internal to Swing). See Search templates configuration, usage and creation to understand how the information is used.

itemsPerPage

Number of item per page (quicksearch)

8

disablePagination

If true, no pages are created

true / false

quicksearchLimit

Max number of results in quicksearch mode.

100

openFilter

If a filter is available and the value is true, the filter is opened by default.

false

conditions

It is an array of additional conditions (filters) to be applied to the search. See Conditions configuration for further details.

Default conditions (filter by type)

resultSetOptions

A set of options to be applied to the search result set. See Result Set Options for further details.

archives

It is an array of indexes, through which the user can choose. See Indexes configuration (archives) for further details.

Result Set Options

The search has the possibility to configure the result set options. If the resultSetOptions setting is not specified, the default value for all the options is applied.

  • showSystemAttributes [true (default)| false] - It shows the system attributes in the response.

  • showAttributes [true | false (default)] - If true, it shows the attributes in the response.

  • showUsageTickets [true | false (default)] - If true, it shows the usage tickets in the response.

  • showVirtualAttributes [true | false (default)] - If true, it shows the virtual attributes in the response.

  • showXml [true (default)| false] - It shows system attributes, attributes, usage tickets and virtual attributes in xml format if their are shown in the response.

  • showJson [true | false (default)] - If true, it shows system attributes, attributes, usage tickets and virtual attributes in Json format if their are shown in the response.

  • showPath [true | false (default)] - If true, it shows the file system path in the response.

Enabling showPath option may negatively affect query response time performance.

Configuration example:

 <resultSetOptions>
    <showAttributes>false</showAttributes>
    <showSystemAttributes>false</showSystemAttributes>
    <showUsageTickets>false</showUsageTickets>
    <showVirtualAttributes>false</showVirtualAttributes>
    <showXml>false</showXml>
    <showJson>false</showJson>
    <showPath>false</showPath>
</resultSetOptions>

Indexes configuration (archives)

Each of them can be configured as follows:

Table 2. Index configuration: properties
Name Description

label

Name used in the search to visually identify the index

archive

The index name. It can contain multiple indexes, separated by a ";" (in this case, all indexes MUST be on the same repository)

repName

The EOMDB repository name. Mandatory for all archives

prefix

If specified, every search with that archive selected will be prepended with this prefix. E.g. in web searches, it is possible to specify "site:www.yoursite.com" as a prefix in order to force the search only on that website.

isDefault

Is true, the index is selected by default

Configuration example:

<archives>
    <archive>
        <label>Editorial</label>
        <archive>production@meth01_eomse1</archive>
        <repName>Editorial</repName>
        <isDefault>true</isDefault>
        <visible>true</visible>
        <enabled>true</enabled>
    </archive>
    <archive>
        <label>Wires</label>
        <archive>ap@eomjse3_meth01;nyt@eomjse3_meth01</archive>
        <repName>Wires</repName>
        <isDefault>false</isDefault>
        <visible>true</visible>
        <enabled>true</enabled>
    </archive>
    <archive>
        <label>Archive</label>
        <archive>archive@meth01_eomjse1</archive>
        <repName>Archive</repName>
        <isDefault>true</isDefault>
        <visible>true</visible>
        <enabled>true</enabled>
    </archive>
</archives>

In case of custom domains (created with a Plugin), it is possible to specify the archives as a function written in the following way:

{
    // ...
    archives: function( ctx, callback ) {
        // Perform same operations...
        callback( [
             { "name": "production", "label": "Editorial",
               "archive": "production@meth01_eomse1",
               "isDefault": true, "visible": true, "enabled": true },
             { "name": "globecms", "label": "GlobeCMS",
               "archive": "globecms@meth01_eomse1",
               "isDefault": false, "visible": true, "enabled": true },
             { "name": "wires", "label": "Wires",
               "archive": "wires@meth01_eomse1",
               "isDefault": false, "visible": true, "enabled": true },
             { "name": "archive", "label": "Archive",
               "archive": "archive@meth01_eomse1",
               "isDefault": false, "visible": true, "enabled": true },
             { "name": "configuration", "label": "Configuration",
               "archive": "configuration@meth01_eomse1",
               "isDefault": false, "visible": true, "enabled": true }
        ]);
    }
}

Conditions configuration

Conditions represent additional specifications added to a query. That is, if the user choose a condition whose value is type:EOM::Story, the results are limited to the EOMDB stories. (In a way, they can be considered as filters).

There are two different types of conditions:

  • default conditions - Such conditions are added in any search that the user performs. They can be seen as permanent filters, or are conditions that always limit or specify the searches that the user makes.

  • alternative conditions - Such conditions, instead, appear in the top right part of the quicksearch form (see picture below). The user can choose among them, to filter the results of a search.

Alternative conditions
Figure 1. Alternative conditions

Default conditions

Configuration example:

<conditions>
    <condition>
        <isDefault>true</isDefault>
        <value>owner:myself</value>
    </condition>
    <condition>
        <isDefault>true</isDefault>
        <value>modified_lastdays:10</value>
    </condition>
    <condition>
        <isDefault>true</isDefault>
        <value>sort:ObjectInfo/modified;D</value>
    </condition>
    <condition>
        <isDefault>true</isDefault>
        <value>metadata:"My/Path=my value"</value>
    </condition>
</conditions>

This sample configuration limits all EOMDB quick-searches to the files whose owner is the current user, and that have been modified in the last 10 days. So, default conditions must have isDefault parameter set to true, and the value parameter set to the condition, as visible in Swing search keywords documentation paragraph.

All the conditions are put with an AND operator, but within a condition it is possible to specify OR operators. In this case, please put the condition within parenthesis.

Example:

<conditions>
    <condition>
        <!-- other properties here -->
        <value>(owner:myself OR owner:johndoe)</value>
    </condition>
</conditions>
Conditions are domain-specific. The described conditions are available only for EOMDB domains. For custom domains, it is you that have to code the behaviour.

Alternative conditions

Configuration example:

<conditions>
    <condition>
        <label>Story</label>
        <icon>emui-icon-newspaper</icon>
        <value>type:eom::story</value>
    </condition>
    <!-- Other conditions -->
</conditions>

The same keyword reference table ( Swing search keywords documentation ) can be used also for the Alternative conditions.

Domains: sample configuration

<search>
    <domains>
        <domain>
            <name>eomdblocal</name>
            <type>eomdb</type>
            <label>Local archive</label>
            <icon>emui-icon-database</icon>
            <defaultFor>image</defaultFor>
            <itemsPerPage>8</itemsPerPage>
            <groupResults>false</groupResults>
            <quicksearchLimit>48</quicksearchLimit>
            <useExternalSuggestion>true</useExternalSuggestion>
            <externalSuggestionURL>http://suggestqueries.google.com/complete/search?q={data.value}&client=firefox&callback=?</externalSuggestionURL>
            <conditions>
                <!-- this is a default condition -->
                <condition>
                    <isDefault>true</isDefault>
                    <value>modified_lastdays:10</value>
                </condition>
                <!-- these are the alternative (variable) condition -->
                <condition>
                    <label>Free search</label>
                    <labelkey>search.types.freesearch</labelkey>
                    <icon>icon-search</icon>
                    <value>type:</value>
                </condition>
                <condition>
                    <label>Story</label>
                    <labelkey>search.types.story</labelkey>
                    <icon>emui-icon-newspaper</icon>
                    <value>type:eom::story</value>
                </condition>
                <condition>
                    <label>WireStory</label>
                    <labelkey>search.types.wirestory</labelkey>
                    <icon>icon-file-text</icon>
                    <value>type:wirestory</value>
                </condition>
                <condition>
                    <label>Images</label>
                    <labelkey>search.types.images</labelkey>
                    <icon>icon-picture</icon>
                    <value>type:image</value>
                </condition>
                <condition>
                    <label>Gallery</label>
                    <labelkey>search.types.gallery</labelkey>
                    <icon>emui-icon-pictures</icon>
                    <value>type:eom::mediagallery</value>
                </condition>
                <condition>
                    <label>Audio</label>
                    <labelkey>search.types.audio</labelkey>
                    <icon>icon-music</icon>
                    <value>type:audio</value>
                </condition>
                <condition>
                    <label>Topic</label>
                    <labelkey>search.types.topic</labelkey>
                    <icon>emui-icon-topic</icon>
                    <value>type:eom::topic</value>
                </condition>
                <condition>
                    <label>Search by name</label>
                    <labelkey>search.types.byname</labelkey>
                    <icon>icon-file</icon>
                    <value>param:name:</value>
                </condition>
            </conditions>
            <archives>
                <archive>
                    <name>production</name>
                    <label>Editorial</label>
                    <archive>production@meth01_eomse1</archive>
                    <isDefault>true</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                </archive>
                <archive>
                    <name>globecms</name>
                    <label>GlobeCMS</label>
                    <archive>globecms@meth01_eomse1</archive>
                    <isDefault>false</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                </archive>
                <archive>
                    <name>wires</name>
                    <label>Wires</label>
                    <archive>wires@meth01_eomse1</archive>
                    <isDefault>false</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                </archive>
                <archive>
                    <name>archive</name>
                    <label>Archive</label>
                    <archive>archive@meth01_eomse1</archive>
                    <isDefault>false</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                </archive>
                <archive>
                    <name>configuration</name>
                    <label>Configuration</label>
                    <archive>configuration@meth01_eomse1</archive>
                    <isDefault>false</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                </archive>
            </archives>
        </domain>
        <domain>
            <name>web</name>
            <type>web</type>
            <label>Web search</label>
            <icon>icon-globe</icon>
            <itemsPerPage>8</itemsPerPage>
            <useExternalSuggestion>true</useExternalSuggestion>
            <conditions>
                <condition>
                    <label>Free search</label>
                    <icon>icon-circle-blank</icon>
                    <value>type:web</value>
                </condition>
                <condition>
                    <label>News</label>
                    <icon>emui-icon-newspaper</icon>
                    <value>type:news</value>
                </condition>
            </conditions>
            <archives>
                <archive>
                    <name>google</name>
                    <label>Google</label>
                    <icon>icon-google</icon>
                    <archive>google</archive>
                    <isDefault>true</isDefault>
                    <visible>true</visible>
                    <enabled>true</enabled>
                    <exclusive>true</exclusive>
                </archive>
            </archives>
        </domain>
    </domains>
</search>

Swing search keywords documentation

Swing searches can be filtered by using keywords. Such keywords are then elaborated and transformed to create the adequate XML query for the EOMDB.

These keywords can be used within the Swing search, the Swing Explorer Folder filter, and the Swing search filters.

The supported keywords are meaningful for EOMDB searches only. If you want to use filters for custom domains, feel free to use any keyword you prefer. The filters will be passed in the conditions array of the Search Controller (options parameter). See Search controller documentation for further details.

Available keywords

channel

Returns only the objects of a given channel.

Syntax
channel:(CHANNEL)
userchannel:(CHANNEL)
Values
Table 3. Supported values
Keyword Example Description

CHANNEL

channel:"Globe-Print"

Any string value (with quotes if there is a space).

userchannel differs from channel in the fact that only the channels relative to the current user are available..

content

Search a specific text in the content of an object.

Syntax
content:"CONTENT"
Values
Table 4. Supported values
Keyword Example Description

CONTENT

content:Test

Any string value (with quotes if there is a space).

contentmetadata

Search for a text in both content and metadata.

Syntax
contentmetadata:"CONTENT"
Values
Table 5. Supported values
Keyword Example Description

CONTENT

contentmetadata:Test

Any string value (with quotes if there is a space).

created_lastdays

Allow to obtain the documents created in the last N days

Syntax
created_lastdays:(VALUE)
Values
Table 6. Supported values
Keyword Example Description

VALUE

created_lastdays:10

Any numeric value.

creator

freexml

Allow to insert a specific xml in the query. Please use it with moderation.

Syntax
freexml:"CONTENT"
Values
Table 7. Supported values
Keyword Example Description

CONTENT

freexml:"<SysAttributes><props><productInfo><issueDate q:op='EXIST'/></productInfo></props></SysAttributes>"

Any string value (with quotes if there is a space). Note: please use single quotes when a double quote is used inside the value.

lastmodifier

Returns the objects last modified by a specific user.

Syntax
lastmodifier:(USER|myself)
Values
Table 8. Supported values
Keyword Example Description

USER

lastmodifier:johndoe

Any string value (with quotes if there is a space). Return the objects modified by the specified user.

myself

lastmodifier:myself

Return the objects modified by the current user

limit

Limits the results to a specific number.

Syntax
limit:(VALUE)
Values
Table 9. Supported values
Keyword Example Description

VALUE

Any numeric value

limit:100

locker, lockedby

Search for objects locked by a given user

Syntax
locker:(USER|myself)
Values
Table 10. Supported values
Keyword Example Description

USER

locker:johndoe

Any string value (with quotes if there is a space). Return the objects locked by the specified user.

myself

locker:myself

Return the objects locked by the current user

locker, lockedby keywords are totally equivalent.

searchmetadata

Search a specific value in all the metadata.

Syntax
searchmetadata:"CONTENT"
Values
Table 11. Supported values
Keyword Example Description

CONTENT

searchmetadata:Test

Any string value (with quotes if there is a space).

metadata

Search a specific value in a given xpath.

Syntax
metadata:"{X-PATH}={VALUE}"
Values
Table 12. Supported values
Keyword Example Description

CONTENT

metadata:"/Metadata/Editorial/ContentType=RANGE"

See previous example. Note: Quotes are mandatory. If the value contains double quotes, use single quotes instead.

metadatarange

Search a specific value in a given xpath, with the "range" operator ( inside the se:attributes tag )

Syntax
metadatarange:"{X-PATH}={VALUE}"
Values
Table 13. Supported values
Keyword Example Description

"{X-PATH}={VALUE}"

metadatarange:"/Metadata/Editorial/ContentType=RANGE"

See previous example. Note: Quotes are mandatory. If the value contains double quotes, use single quotes instead.

The RANGE value must be in the following format: YYYYMMDDhhmmss;YYYYMMDDhhmmss.

modified_lastdays

Allow to obtain the documents modified in the last N days

Syntax
modified_lastdays:(VALUE)
Values
Table 14. Supported values
Keyword Example Description

VALUE

modified_lastdays:10

Any numeric value.

name

Search an object with a specific filename

Syntax
name:"CONTENT"
Values
Table 15. Supported values
Keyword Example Description

NAME

name:Test

Any string value

range

restrictto

Returns the objects inside a path.

Syntax
restrictto:(VALUE)
Values
Table 16. Supported values
Keyword Example Description

VALUE

Any string value (with quotes if there is a space).

restrictto:"/Globe/Images"

sort

Complete sorting mechanism.

Syntax
sort:"{X-PATH};{VALUE}"
Values
Table 17. Supported values
Keyword Example Description

"{X-PATH};{VALUE}"

sort:"ObjectInfo/modified;ND"

See previous example. Note: Quotes are mandatory. If the value contains double quotes, use single quotes instead.

In {x-path};{Value}, value can be:

Table 18. Values
Value Description

A

Ascending

D

Descending

NA

Numeric Ascending

ND

Ascending

sortby

Simple descending sort according to a parameter in the ObjectInfo.

Syntax
sortby:(VALUE)
Values
Table 19. Supported values
Keyword Example Description

created

sortby:created

Return the objects sorted by creation date, descending.

modified

sortby:modified

Return the objects sorted by modified date, descending.

status, workflow

Search objects with a given status ( workflow ).

Syntax
status:(VALUE)
Values
Table 20. Supported values
Keyword Example Description

VALUE

status:NewsFlow/Editing

Any string value (with quotes if there is a space).

type

Returns only the objects of a given type.

Syntax
type:(TYPE)
Values
Table 21. Supported values
Keyword Example Description

TYPE

type:EOM::Story

Any string value (with quotes if there is a space). Return the objects of specified type.

usageticket

Allow to search within the usage tickets.

Syntax
usageticket:"tp:{type};;c:{creator};;rng:{range}"
Values
Table 22. Supported values
Keyword Example Description

CONTENT

tp:{type};;c:{creator};;rng:{range}

usageticket:"tp:WebPub;c:alessandropiana;rng:20160420220000__20160421215900"

  • Type (tp) is the only mandatory field for the usageticket filter. creator (c) and range (rng) are optional.

  • Range (rng) is in the format YYYYMMDDhhmmss__YYYYMMDDhhmmss

  • Separate the fields with a double ; ( ;; ).

  • If the field values have spaces in it, use a double underscore instead of spaces ( __ )

user, creator, owner

Search for objects created by a given user

Syntax
user:(USER|myself)
Values
Table 23. Supported values
Keyword Example Description

USER

user:johndoe

Any string value (with quotes if there is a space). Return the objects created by the specified user.

myself

user:myself

Return the objects created by the current user

user, creator, owner keywords are totally equivalent.

userchannel

See channel.

workflow

workfolder

Returns the objects inside a workfolder.

Syntax
workfolder:(VALUE)
Values
Table 24. Supported values
Keyword Example Description

VALUE

Any string value (with quotes if there is a space).

workfolder:"/Globe/Images"

Search templates configuration, usage and creation

Méthode Swing uses templates to render the search results.

Configuration of result templates

To use a template, it is necessary to configure the searchTemplate options in the Domain section. See Domain configuration for further details.

It is HIGHLY discouraged to change the default search themes for Methode types. Their layout can be customized by operating on the specific column catalog (SwingResultSet).

In the ResourceSpace example, we used the following settings:

<searchTemplate>
    <type>rsimage</type>
    <template>search-preview-resourcespace.html</template>
</searchTemplate>
<searchTemplate>
    <type>rstext</type>
    <template>search-preview-resourcespace-text.html</template>
</searchTemplate>
"searchTemplate" : [
    { type: "rsimage", template: "search-preview-resourcespace.html" },
    { type: "rstext", template: "search-preview-resourcespace-text.html" }
]

This settings specifies that we are using two templates for two different types.

It is possible to use the same template for different types, but only one template can be configured for a type regardless of the domain. Therefore, in the event that the same type is configured with multiple templates (even if in different domains), only the last template for that type will be taken into consideration.

Usage and creation of a template

Each template is an HTML file which can be customized according to the user’s necessity.

All the widgets are put inside the following path:

{SWING-APP}/config/templates/search/{TEMPLATE-NAME}

Preview files can be configured outside {SWING-APP}. See the paragraph How to configure search templates in external folder for some tips in how to take advantage of this new configuration option.

For example, the default templates for Methode content and images are the following:

Table 25. Default templates
Template type Template name Example

Content

src-preview-eom.html

Swing Search Content Default template
Figure 2. Swing Search Content Default template

Default templates are:

  • src-preview-eom.html for Methode types (used in search, candidate and correlates)

  • src-preview-user.html for type: EOM::User

  • src-preview-webcontent.html for type: web::Content

Customize the templates

Méthode Swing uses Underscore.JS templating system to enhance the user experience.

See Underscore.JS for further information, or the box below for some useful tips.

The template is rendered with a main object:

  • item, which contains all the information about the item.

item: the item info

The item object inside template contains all the information retrived from the search source. That is, in case of external sources, the one you decide to pass back to the search. In general though, all Méthode objects should have the following properties:

// item: common properties { EXAMPLE }
{
    "id": "1.0.113665564",
    "columns": "SEE BOX BELOW"
    "name": "Obama, Hollande agree on much -- but not Afghanistan.xml",
    "description": "",
    "type": "EOM::Story",
    "owner": "johndoe",
    "creator": "johndoe",
    "created": 1337764225,
    "last_modifier": "johndoe",
    "modified": 1409816672,
    "locker": "",
    "locked": 1423560030,
    "status_info": {
        "name": "NewsFlow/Editing",
        "identifier": "RGB(255,0,0)",
        "comment": ""
    },
    "size": 6898,
    "system_attributes": {
        "workfolder": "/Globe/Politics",
        "templateName": "/SysConfig/Globe/Templates/story.xml",
        "summary": "New French President Francois Hollande told President Barack Obama on Friday that he will stick by his pledge .",
        "wordCount": "998",
        "sugCategory": "",
        "channel": "Globe-Web",
        "storyType": "",
        "productInfo": {
            "name": "Globe-Web",
            "issueDate": "20120524"
        }
    },
    "system_attributes_xml": "XML HERE",
    "createdStr": "20120523091025",
    "modifiedStr": "20140904074432",
    "channel": "Globe-Web",
    "issueDate": "20120524",
    "preview": "/WebClient/api/rest/object/preview?token=12dbbac2-6d8d-445d-8a26-8f79ff0aca84&id=1.0.113665564&fa=lowres"
}

Beyond these properties, ALL the results will at least have the following properties:

// item: other properties which will be always available for ANY object ( also external )
{
   title: 'Object title if available, otherwise equals to filename',
   preview: 'the preview URL which uses the Methode Preview server',
   previewThumbnail: 'the preview URL which uses the Methode Preview Thumbnail server'
   content: 'if not already available, the summary from the system attributes'
}

There is also the eomActions property, which has the HTML of the actions available for the object. If you want to have some actions available for the item, be sure to include this property inside a DOM element whose class is actions somewhere in the template.

item.columns: columnCatalog properties

The EOMDB results come with an additional property, named columns. The property is a JSON array containing the values specified in the ColumnCatalog associated with the search.

The default column catalog applyed by Swing is as follows (this can been overwritten in the columnCfgCatalogs.swing.xml file):

<!-- Swing ResultSet views -->
<catalog name="SwingResultSet" dir="/" type="methodeResultSetList" listable="true">
    <EOMCfgView>
        <props sort="name+type&amp;ascending" activeViewer="off" autoScroll="none" />
        <column fieldId="1" width="300" name="Title" priority="5">
            <choice op="notEmpty" minLength="5">
                <data source="info/system_attributes/props/title" />
                <data source="info/attributes/ObjectMetadata/General/Headline" />
                <data source="info/attributes/Metadata/DocTitle" />
                <data source="info/attributes/ObjectMetadata/iptc/headline" />
                <data source="info/attributes/ObjectMetadata/iptc/caption" />
                <data source="info/attributes/ObjectMetadata/iptc/image_name" />
                <data source="info/attributes/Metadata/Title" />
                <data source="info/attributes/meta/wire/title" />
                <data source="info/attributes/ObjectMetadata/GeneralMetadata/Headline" />
                <data source="info/attributes/meta/wire/title" />
                <data source="info/attributes/ObjectMetadata/iptc/caption" />
                <data source="info/attributes/Metadata/Keywords" />
                <data source="info/attributes/Metadata/DocKeywords" />
                <data source="info/name" />
            </choice>
        </column>
        <column fieldId="2" width="300" name="Summary" priority="5">
            <choice op="notEmpty" minLength="1">
                <data source="info/system_attributes/props/summary" />
                <data source="info/attributes/Metadata/iptc/caption" />
            </choice>
        </column>
        <column fieldId="3" name="Date" source="info/created" width="130" />
        <column fieldId="4" name="Type" width="90" source="info/type" priority="1" />
        <!-- Wires -->
        <column fieldId="5" name="Agency" width="90" priority="4">
            <choice op="notEmpty" minLength="1">
                <data source="info/attributes/ObjectMetadata/iptc/credit" />
                <data source="info/attributes/ObjectMetadata/Source"/>
                <data source="info/attributes/Metadata/Source"/>
            </choice>
            </column>
            <column fieldId="6" name="Category" width="90" priority="4">
            <choice op="notEmpty" minLength="1">
                <data source="info/attributes/ObjectMetadata/iptc/category" />
                <data source="info/attributes/ObjectMetadata/Category"/>
                <data source="info/attributes/Metadata/Category"/>
            </choice>
            </column>
            <!-- Production -->
        <column fieldId="7" name="WorkFolder" source="info/system_attributes/props/workFolder" width="90" priority="4"/>
        <column fieldId="8" name="Channel" source="info/system_attributes/props/productInfo/name" width="90" priority="4"/>

        <column fieldId="9" width="90" priority="4" name="Status">
            <data source="info/status_info/identifier" format="si:colorRect"/>
            <data source="info/status_info/name" format="tk:/$2" priority="3"/>
        </column>
        <column fieldId="10" width="70" priority="3" name="Locker" source="info/locker" format="lk:icon_name"/>
    </EOMCfgView>
</catalog>

Here an example of a record that represents the previous columns property:

[
    {
        "name": "Summary",
        "value": "President Barack Obama is photographed during a presidential portrait sitting for an official photo ...",
        "id": "2"
    },
    {
        "name": "Type",
        "value": " Image",
        "id": "4",
        "priority": "1"
    },
    {
        "name": "Locker",
        "value": "johndoe",
        "id": "10"
    }
]

If desired, it is possible to specify your own column catalog in the search domain configuration of the EOMDB. See Domain configuration for further information.

How to configure the Web Search Domain

To configure the Web Search domain (Google), it is necessary to add the custom apikey in the MRAS configuration file, such as:

<config>
    <restApi>
        <!-- ... -->
        <searchEngines>
            <searchEngine id="google" dataSourceClass="com.eidosmedia.restserver.websearch.google.GoogleCustomSearchDataSource">
                <generic apiKey="YOUR_API_KEY" searchEngineCx="015464143803231643050:kgucpqylmq4"/>
            </searchEngine>
        </searchEngines>
    </restApi>
</config>

How to configure search templates in external folder

Additional search templates may be made available to Swing application by defining one or more nested components in Swing web context in server.xml. (for further details on Tomcat 9.x Resources configuration, please refer to Resources configuration).

This is an example of the external search templates configuration.

<Context docBase="com.eidosmedia.webclient.web-app"
    path="/swing" reloadable="false">
    <Resources className="org.apache.catalina.webresources.StandardRoot">
        <PreResources
            className="org.apache.catalina.webresources.DirResourceSet"
            base="/methode/meth01/extension/search" readOnly="true"
            webAppMount="/config/templates/search" />
    </Resources>
</Context>

Extensions: create custom domains and integrate External Digital Asset Management (DAM) services.

Documentation is included in External DAM Integration.

Extensions: manipulate the search free text and XML

It is possible to manipulate the free text input BEFORE it is sent to validation and, in case of EOMDB searches, transformed into XML. For EOMDB searches, too, it is possible to add an additional validator to change the query XML just before the execution. The methods are described below.

addTextValidator

eidosmedia.webclient.search.addTextValidator(options);

In detail, the options are:

/**
 * CUSTOM TEXT VALIDATOR
 */
eidosmedia.webclient.search.addTextValidator({
    // @property "domain": {string} - a specific search domain to apply the filter to
    // @required - domain or domainType
    "domain": "eomdblocal",

    // @property "domainType": {string} - if specified, filter is applied to all the domains of the same type
    // @required - domain or domainType
    // "domainType": "eomdb"
}, function( searchInfo ) {
    // Search info contains the following properties:
    // - "textInput" {string} - the current search text.
    // - "conditions": {array of objects} - the conditions currently selected by the user, filters included.

    // Please beware that changes in the conditions made here will NOT be reflected in the search.
    // This methods only allows simple alterations to the search free text.

    var _textInput = searchInfo.textInput;
    // Simple elaboration.
    if ( _textInput === 'obama' ) {
        _textInput = '"Barack Obama"';
    }

    // This method must return the new search text, and only this.
    return _textInput;
});

addXMLValidator

eidosmedia.webclient.search.addXMLValidator(options, callback);

In detail, the options are:

/**
 * CUSTOM XML VALIDATOR
 */
eidosmedia.webclient.search.addXMLValidator({
    // @property "domain": {string} - a specific search domain to apply the filter to
    // @required - domain or domainType
    "domain": "eomdblocal",

    // @property "domainType": {string} - if specified, filter is applied to all the domains of the same type
    // @required - domain or domainType
    // "domainType": "eomdb"
}, function( searchInfo, callback ) {
    // Search info contains the following properties:
    // - "textInput" {string} - the current search text.
    // - "conditions": {array of objects} - the conditions currently selected by the user, filters included.
    // - "queryXML": {string} the final XML of the query

    // Please beware that changes in the conditions made here will NOT be reflected in the search.

    /* IMPORTANT: Please notice the difference with "addTextValidator". This function uses a callback
       to return the value */
    var _queryXML = searchInfo.queryXML;
    // Some elaboration here...
    // This method must call the "callback" with the new XML
    callback( _queryXML );
});