OMN Search API

The OMN Search REST API provides access to OMN’s search and result navigation functionality via a RESTful API.

OMN Search API usage guide

To access the OMN Search REST API you can use basically any programming language that has support for the HTTP protocol. You can even use command line tools like curl to process REST requests.

Here you will find an overview over the basic requests you need to perform searches in OMN.

.1. Authentication

The OMN Search REST API uses JSON Web Tokens (JWT) to secure the access. You have to provide a valid JWT in the authorization header to access the OMN Web REST API resources. To generate or debug JWTs you can use jwt.io.

curl header parameter
curl -H 'Authorization: Bearer <JWT-TOKEN>' ...

.2. Version resource

The info resource provides version information about the OMN Search REST API. This is a simple starting point to test your REST requests.

Table 1. Details

Resource path

/api/v1/search/version

HTTP method

GET

Response type

application/json

Request:
curl -X GET -H 'Authorization: Bearer <JWT-TOKEN>' 'http://<OMN-ADDRESS>/api/v1/search/version'
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 0,
    "majorVersion": "{parsedversion-majorversion}",
    "minorVersion": "{parsedversion-minorversion}",
    "patchVersion": "{parsedversion-buildnumber}",
    "buildNumber": "{parsedversion-qualifier}"
}

.3. Search resource

OMN Search basically supports two search types: CONFIG-based searches and INDEX-based searches. The CONFIG-based searches match the search configurations of the OMN config client which define object type, result views, additional rules and data filters.

The INDEX-based searches perform searches directly in the index and do not apply any plugin backend configurations. They can be used, for example, to fetch data directly from the index.

Note: All field names that are passed as request parameters or returned in the response are in OMN expression format with dots (".") replaced by tildes ("~").

Sample for OMN expression field name 'ISYImage.imageStorageInfo.heightInPixel':
{
    "name": "ISYImage~imageStorageInfo~heightInPixel",
    "type": "long",
    "value": 827
}

The fulltext search is the simplest form of searches. It searches the content of the "fulltext" index which contains a combination of several OMN attributes in one field.

.3.2. Fulltext search with backend configuration

Searches with backend configuration ("searchType": "CONFIG") rely on search configurations defined in OMN. The value of the request parameter "configId" must be a valid ID of an "AdvancedSearch" or "FormBasedSearch" Page plugin.

Table 2. Details

Resource path

/api/v1/search/search

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "context": {
        "searchType": "CONFIG",
        "configId": 15567
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "jpg"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 544,
    "resultCount": 6553,
    "totalHitCount": 6553,
    "exactHitCount": true,
    "items": [
        {
            "id": 693000842,
            "attributes": [
                {
                    "name": "ISYImage~imageStorageInfo~heightInPixel",
                    "type": "long",
                    "value": 827
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~pdfFirstPagePreviewOnly",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYImage~imageStorageInfo~colorspace",
                    "type": "string",
                    "value": "YCbCr/RGB"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~relativePath",
                    "type": "string",
                    "value": "MAM/"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~disablePreviewGeneration",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYObject~preview~thumbnail",
                    "type": "string",
                    "value": [
                        "62569466-8EE3-4ECE-862A-DFAF9F57522C"
                    ]
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~identity",
                    "type": "long",
                    "value": 24510
                },

...

            ]
        },

...

    ],
    "facets": [
        {
            "name" : "ISYObject~isyObjectType",
            "facets" : [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~isyObjectType",
                    "label": "ISYObject~isyObjectType",
                    "type": "string",
                    "value": "IMG",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        },
        {
            "name": "ISYObject~online",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~online",
                    "label": "ISYObject~online",
                    "type": "boolean",
                    "value": "true",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        }
    ]
}
Fulltext search with backend configuration and defined result attributes

The request parameter "resultAttributes" can be used to specify the OMN attributes which will be included in the response. This will save processing time an will reduce the response size. If the request parameter "resultAttributes" does not exist or is empty, all attributes are returned.

Table 3. Details

Resource path

/api/v1/search/search

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "context": {
        "searchType": "CONFIG",
        "configId": 15567
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "jpg"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ],
    "resultAttributes": [
        "ISYImage~imageStorageInfo~heightInPixel",
        "ISYImage~imageStorageInfo~colorspace"]
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 337,
    "resultCount": 6553,
    "totalHitCount": 6553,
    "exactHitCount": true,
    "items": [
        {
            "id": 693000842,
            "attributes": [
                {
                    "name": "ISYImage~imageStorageInfo~heightInPixel",
                    "type": "long",
                    "value": 827
                },
                {
                    "name": "ISYImage~imageStorageInfo~colorspace",
                    "type": "string",
                    "value": "YCbCr/RGB"
                },
                {
                    "name": "id",
                    "type": "long",
                    "value": 693000842
                }
            ]
        },
        {
            "id": 692976759,
            "attributes": [
                {
                    "name": "ISYImage~imageStorageInfo~heightInPixel",
                    "type": "long",
                    "value": 281
                },
                {
                    "name": "ISYImage~imageStorageInfo~colorspace",
                    "type": "string",
                    "value": "YCbCr/RGB"
                },
                {
                    "name": "id",
                    "type": "long",
                    "value": 692976759
                }
            ]
        },

...

    ],
    "facets": [
        {
            "name": "ISYObject~isyObjectType",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~isyObjectType",
                    "label": "ISYObject~isyObjectType",
                    "type": "string",
                    "value": "IMG",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        },
        {
            "name": "ISYObject~online",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~online",
                    "label": "ISYObject~online",
                    "type": "boolean",
                    "value": "true",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        }
    ]
}
Fulltext search without backend configuration

The search without backend configuration ("searchType": "INDEX") can be used to directly search in a specific index.

Table 4. Details

Resource path

/api/v1/search/search

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "context": {
        "searchType": "INDEX",
        "index": "ASSET"
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "jpg"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 242,
    "resultCount": 6553,
    "totalHitCount": 6553,
    "exactHitCount": true,
    "items": [
        {
            "id": 693000842,
            "attributes": [
                {
                    "name": "ISYImage~imageStorageInfo~heightInPixel",
                    "type": "long",
                    "value": 827
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~pdfFirstPagePreviewOnly",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYImage~imageStorageInfo~colorspace",
                    "type": "string",
                    "value": "YCbCr/RGB"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~relativePath",
                    "type": "string",
                    "value": "MAM/"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~disablePreviewGeneration",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYObject~preview~thumbnail",
                    "type": "string",
                    "value": [
                        "62569466-8EE3-4ECE-862A-DFAF9F57522C"
                    ]
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~identity",
                    "type": "long",
                    "value": 24510
                },

...

            ]
        },

...

    ],
    "facets": [
        {
            "name": "ISYObject~isyObjectType",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~isyObjectType",
                    "label": "ISYObject~isyObjectType",
                    "type": "string",
                    "value": "IMG",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        },
        {
            "name": "ISYObject~online",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~online",
                    "label": "ISYObject~online",
                    "type": "boolean",
                    "value": "true",
                    "from": null,
                    "to": null,
                    "count": 6553,
                    "children": null
                }
            ]
        }
    ]
}

.3.3. Fulltext search global

The global search performs a fulltext search in all indices, which are ASSET,CHANNEL and PRODUCT. Each of this indices share common fields:

Table 5. Details
Field name Meaning

globalIndexType

index

globalObjectType

object type

globalName

name

globalIdentity

identity

globalCreationDate

creation date

globalModificationDate

modification date

Table 6. Previews
Preview Expression Supported index type

THUMBNAIL

globalPreview~thumbnail

asset,product

COARSE

globalPreview~coarse

asset,product

Example:

Table 7. Details

Resource path

/api/v1/search/search

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "context": {
        "searchType": "INDEX",
        "index": "GLOBAL"
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "20160829"
    },
    "maxResults": 10,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "resultAttributes": [
        "globalIndexType",
        "globalObjectType",
        "globalName",
        "globalIdentity",
        "globalCreationDate",
        "globalModificationDate",
        "globalPreview~thumbnail"
    ],
    "sortOptions": [
        {
            "attribute": "globalCreationDate",
            "direction": "ASC"
        }
    ]
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 9,
    "resultCount": 2,
    "totalHitCount": 2,
    "exactHitCount": true,
    "items": [
        {
            "id": 23448300,
            "attributes": [
                {
                    "name": "globalName",
                    "type": "string",
                    "value": "20160829_203230.jpg"
                },
                {
                    "name": "globalIndexType",
                    "type": "string",
                    "value": "asset"
                },
                {
                    "name": "globalCreationDate",
                    "type": "date",
                    "value": "2019-07-02T11:31:39.485Z"
                },
                {
                    "name": "globalIdentity",
                    "type": "long",
                    "value": 23448300
                },
                {
                    "name": "globalModificationDate",
                    "type": "date",
                    "value": "2019-07-12T09:45:56.880Z"
                },
                {
                    "name": "id",
                    "type": "unknown",
                    "value": 23448300
                },
                {
                    "name": "globalObjectType",
                    "type": "string",
                    "value": "IMG"
                },
                {
                    "name": "globalPreview~thumbnail",
                    "type": "string",
                    "value": [
                        "FC9A1216-1E87-BB87-D3A0-5AC6A9F48B67"
                    ]
                }
            ]
        },
        {
            "id": 23452040,
            "attributes": [
                {
                    "name": "globalName",
                    "type": "string",
                    "value": "20160829_082449.jpg"
                },
                {
                    "name": "globalIndexType",
                    "type": "string",
                    "value": "asset"
                },
                {
                    "name": "globalCreationDate",
                    "type": "date",
                    "value": "2019-07-12T11:46:59.226Z"
                },
                {
                    "name": "globalIdentity",
                    "type": "long",
                    "value": 23452040
                },
                {
                    "name": "globalModificationDate",
                    "type": "date",
                    "value": "2019-07-13T19:00:57.262Z"
                },
                {
                    "name": "id",
                    "type": "unknown",
                    "value": 23452040
                },
                {
                    "name": "globalObjectType",
                    "type": "string",
                    "value": "IMG"
                },
                {
                    "name": "globalPreview~thumbnail",
                    "type": "string",
                    "value": [
                        "1AFAF479-7165-EDD8-FD65-5F4A7E8DF11C"
                    ]
                }
            ]
        }
    ],
    "facets": [
        {
            "name": "globalIndexType",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "globalIndexType",
                    "label": "globalIndexType",
                    "type": "string",
                    "value": "asset",
                    "count": 2,
                    "from": null,
                    "to": null,
                    "children": null
                }
            ]
        },
        {
            "name": "globalObjectType",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "globalObjectType",
                    "label": "globalObjectType",
                    "type": "string",
                    "value": "IMG",
                    "count": 1287,
                    "from": null,
                    "to": null,
                    "children": null
                }
            ]
        }
    ]
}

Combined searches ("queryType": "COMBINED") can be used to combine different queries. This is for example useful to implement facet searches (drill down) in which the query entered by the user is combined with the selected facets. The example below shows the combination of a fulltext query ("queryType": "FULLTEXT" - e.g. the user input) with a field query ("queryType": "FIELD" - e.g. a selected facet).

When executing facet searches the request parameter keyword=true must be passed for a "field query" for string values, otherwise wrong results will occur for values containing separators (e.g. blanks, hyphens, etc.). For example the query string "Baden-Württemberg" would also match on values "Baden" or "Württemberg" when the parameter keyword=true isn’t not passed.

When searching with the operators IS_EMPTY/IS_NOT_EMPTY, the value parameter is ignored and therefore does not have to be set.

When searching with the operators IN/NOT_IN or IS_EMPTY/IS_NOT_EMPTY, the keyword parameter is ignored and therefore does not have to be set.

Note: When executing a facet search the whole previous search query must always be combined with the facet query to prevent inconsistent results.

Table 8. Details

Resource path

/api/v1/search/search

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "15567"
    },
      "resultAttributes": [
        "ISYObject~identity",
        "ISYObject~name",
        "ISYObject~isyObjectType",
        "ISYObject~online",
        "ISYObject~modificationDate",
        ...
      ],
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FULLTEXT",
                "value": "web"
            },
            {
                "queryType": "FIELD",
                "name": "ISYObject~isyObjectType",
                "comparator": "EQ",
                "value": "IMG",
                "keyword": "true"
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 245,
    "resultCount": 1025,
    "totalHitCount": 1025,
    "exactHitCount": true,
    "items": [
        {
            "id": 693000842,
            "attributes": [
                {
                    "name": "ISYImage~imageStorageInfo~heightInPixel",
                    "type": "long",
                    "value": 827
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~pdfFirstPagePreviewOnly",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYImage~imageStorageInfo~colorspace",
                    "type": "string",
                    "value": "YCbCr/RGB"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~relativePath",
                    "type": "string",
                    "value": "MAM/"
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~disablePreviewGeneration",
                    "type": "boolean",
                    "value": false
                },
                {
                    "name": "ISYObject~preview~thumbnail",
                    "type": "string",
                    "value": [
                        "62569466-8EE3-4ECE-862A-DFAF9F57522C"
                    ]
                },
                {
                    "name": "ISYObject~rootNodeConfiguration~identity",
                    "type": "long",
                    "value": 24510
                },

...

            ]
        },

...

    ],
    ],
    "facets": [
        {
            "name": "ISYObject~isyObjectType",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~isyObjectType",
                    "label": "ISYObject~isyObjectType",
                    "type": "string",
                    "value": "IMG",
                    "count": 1025,
                    "from": null,
                    "to": null,
                    "children": null
                }
            ]
        },
        {
            "name": "ISYObject~online",
            "facets": [
                {
                    "facetType": "NAMED",
                    "attribute": "ISYObject~online",
                    "label": "ISYObject~online",
                    "type": "boolean",
                    "value": "true",
                    "count": 1025,
                    "to": null,
                    "from": null,
                    "children": null
                }
            ]
        },
        {
            "name": "ISYObject~modificationDate",
            "facets": [
                {
                    "facetType": "RANGED",
                    "attribute": "ISYObject~modificationDate",
                    "label": "last-year",
                    "type": "date",
                    "value": "last-year",
                    "count": 384,
                    "from": "{year-ago-iso-8601}",
                    "to": null,
                    "children": null
                }
            ]
        }
    }
}
Table 9. Additional request parameter for facet searches ("aggregations"):
Parameter Meaning

aggregationEnabled

Aggregation (facet search) enabled true or false (default: false)

aggregationMaxResults

Maximum number of requested aggregation results (default: 10)

Complex combined searches

Combined searches can also be used to perform more complex searches, e.g. form-based searches or special searches. The query terms may also be nested.

Table 10. Supported operators:
Operator

AND

OR

Table 11. Supported field comparators:
Comparator Meaning

EQ

equals

NOT_EQ

not equals

LIKE

like

NOT_LIKE

not like

GT

greater than

GE

greater equals

LT

lower than

LE

lower equals

TERM_STARTS_WITH

starts with

TERM_NOT_STARTS_WITH

not starts with

TERM_ENDS_WITH

ends with

TERM_NOT_ENDS_WITH

not ends with

TERM_WILDCARD

wildcard (*sch?nes* Beispiel*)

IN

in ("one of"), value must be an array

NOT_IN

not in ("not one of"), value must be an array

IS_EMPTY

is empty (value will be ignored)

IS_NOT_EMPTY

is not empty (value will be ignored)

Form based search request sample with three fields:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FIELD",
                "name": "ISYObject~isyObjectType",
                "comparator": "EQ",
                "value": "IMG"
            },
            {
                "queryType": "FIELD",
                "name": "ISYImage~imageStorageInfo~colorspace",
                "comparator": "EQ",
                "value": "RGB"
            },
            {
                "queryType": "FIELD",
                "name": "ISYImage~imageStorageInfo~heightInPixel",
                "comparator": "GT",
                "value": 1000
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Nested search request sample:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FIELD",
                "name": "ISYObject~isyObjectType",
                "comparator": "EQ",
                "value": "IMG"
            },
            {
                "queryType": "FIELD",
                "name": "ISYImage~imageStorageInfo~colorspace",
                "comparator": "EQ",
                "value": "RGB"
            },
            {
                "queryType": "COMBINED",
                "operator": "OR",
                "queries": [
                    {
                        "queryType": "FIELD",
                        "name": "ISYImage~imageStorageInfo~heightInPixel",
                        "comparator": "GT",
                        "value": 1000
                    },
                    {
                        "queryType": "FIELD",
                        "name": "ISYImage~imageStorageInfo~widthInPixel",
                        "comparator": "GT",
                        "value": 1000
                    }
                ]
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Field searches with comparator IN/NOT_IN

The IN comparator can be used to search over several values of a field within a single term. The value parameter has to be passed as an array.

Table 12. Supported IN/NOT_IN comparators:
Comparator Meaning

IN

in ("one of"), value must be an array

NOT_IN

not in ("not one of"), value must be an array

Form based search request sample with IN comparator and string values:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FULLTEXT",
                "value": "jpg"
            },
            {
                "queryType": "FIELD",
                "name": "ISYObject~isyObjectType",
                "comparator": "IN",
                "value": [ "IMG", "FIL" ]
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Form based search request sample with NOT_IN comparator and string values:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FULLTEXT",
                "value": "jpg"
            },
            {
                "queryType": "FIELD",
                "name": "ISYObject~isyObjectType",
                "comparator": "NOT_IN",
                "value": ["IMG", "XYZ"]
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Form based search request sample with IN comparator and number values:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
    "query": {
        "queryType": "COMBINED",
        "operator": "AND",
        "queries": [
            {
                "queryType": "FULLTEXT",
                "value": "jpg"
            },
            {
                "queryType": "FIELD",
                "name": "id",
                "comparator": "IN",
                "value": [ 22390937, 23244732, 23324592 ]
            }
        ]
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}
Field searches with comparator IS_EMPTY/IS_NOT_EMPTY

The IS_EMPTY comparator can be used to search for records where the given field is empty. The IS_NOT_EMPTY comparator can be used to search for records where the given field is NOT empty.

Table 13. Supported IS_EMPTY/IS_NOT_EMPTY comparators:
Comparator Meaning

IS_EMPTY

is empty (value will be ignored)

IS_NOT_EMPTY

is not empty (value will be ignored)

Form based search request sample with IS_EMPTY comparator:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
   "query": {
        "queryType": "FIELD",
        "comparator": "IS_EMPTY",
        "name": "ISYObject~fileCreator~shortName"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ],
    "resultAttributes": [
        "id",
        "ISYObject~fileCreator~shortName"]
}
Form based search request sample with IS_NOT_EMPTY comparator:
{
    "context": {
        "searchType": "CONFIG",
        "configId": "22459895"
    },
   "query": {
        "queryType": "FIELD",
        "comparator": "IS_NOT_EMPTY",
        "name": "ISYObject~fileCreator~shortName"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ],
    "resultAttributes": [
        "id",
        "ISYObject~fileCreator~shortName"]
}

.3.5. Sub-Searches (Join)

A sub-search(Join) is executed before the "main"-search. As a result field the sub-search must only return 1 attribute. The result is then combined with the main search (joinOn). A sub-search is similar to a SQL join/sub-select. Note that the number of sub-search result is limited to 65.000. If it is exceeded only the first 65.000 results from the sub-search are taken, so the main search may have to few results. Furthermore search option like pagination, max-result, sorting and aggregation are ignored for sub-searches.

Full-text search request sample with sub-search, search assets by channels:
{
    "context": {
        "searchType": "INDEX",
        "index": "ASSET"
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": ""
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 100,
    "aggregationEnabled": true,
    "resultAttributes": [
        "ISYObject~name","ISYObject~identity"
    ],
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "ASC"
        }
    ],
    "join": {
        "search": {
            "context": {
                "searchType": "INDEX",
                "index": "CHANNEL"
            },
            "query": {
                "queryType": "FULLTEXT",
                "value": "0000101"
            },
            "resultAttributes": [
                "identity"
            ]
        },
        "joinOn": "channels"
    }
}

.3.6. Aggregations

An additional array ("aggregationAttributes") can be specified, to include aggretations(facets) in the search result. Notice the attribtues(fields) must be aggregatable and ("aggregationEnabled") must be true

Sample request
{
    "context": {
        "searchType": "INDEX",
        "index": "ASSET"
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "test"
    },
    "maxResults": 10,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "resultAttributes" : ["ISYObject~name"],
    "aggregationAttributes" : ["globalModificationDate", "globalIndexType", "globalObjectType"],
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "ASC"
        }
    ]
}

Note: All attributes(fields) with type "ENUM","BOOLEAN" and "DATE" are default aggregatable. Others must be configured to be "aggregatable". See Configuration Options to get how to set "aggregatable" options.

.3.7. Pagination

For each search request the page size ("pageSize") and the page index ("pageIndex") must be passed. The search result contains the meta data items ("items") of the requested page, the number of retrievable hits ("resultCount") and the total number of hits ("totalHitCount"). The number of pages can be calculated using the page size and the number of retrievable hits.

The additional return value "exactHitCount" indicates whether the value of "totalHitCount" is exact or not: With "true" "totalHitCount" is the exact number of hits, with "false" the number of hits was only determined up to the value of "totalHitCount", but there are more hits.

To query another page of a search result the previous search request must be executed again with the page index changed.

Note: Since the pagination always performs a new search the search result may vary when switching pages.

Sample request for second result page:
{
    "context": {
        "searchType": "CONFIG",
        "configId": 15567
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "jpg"
    },
    "maxResults": 10000,
    "pageIndex": 2,
    "pageSize": 10,
    "aggregationEnabled": true,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ]
}

.3.8. Sorting

A search can be performed unsorted (empty or missing request parameter "sortOptions") or with one or more sort criteria. The order of the sort criteria in the request parameter "sortOptions" defines their priority.

Example of two sort criteria:
{
    ...,

    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        },
        {
            "attribute": "ISYObject~name",
            "direction": "ASC"
        }
    ]
}
Table 14. Supported sort directions:
Modifier direction

ASC

ascending

DESC

descending

.3.9. Content language

The content language of multilingual fields can be addressed in a search request via the language parameter.

NOTE: At the moment only asset and product index support multilingual fields!

Table 15. Request parameter
Name Description Required

language

Content language (Format: <ISO-639-1 language code>_<ISO-3166-1 country code> e.g. "de_DE")

Fulltext query returning multilingual fields

When the language parameter is provide in a search request the content of multilingual fields will only be returned in the language variant of the dedicated content language.

Sample request providing the content language:
{
    "context": {
        "searchType": "INDEX",
        "index": "ASSET"
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "dilbert"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "language": "de_DE"
}
Sample response for dedicated content language:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 55,
    "resultCount": 4,
    "totalHitCount": 4,
    "exactHitCount": true,
    "items": [
        {
            "id": 23412813,
            "attributes": [
                {
                    "name": "globalName",
                    "type": "string",
                    "value": "dilbert_dreaming.gif"
                },
...
                {
                    "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR",
                    "type": "string",
                    "value": "Masha deutsch"
                },
...
            ]
        },
...
    ],
    "facets": []
}

When the language parameter is missing in the search request the content of multilingual fields is returned in every existing language variant. This results in multiple occurrences of the multilingual field in the result attributes, each of them including the related content language as a field name suffix.

Sample response for when content language not provided:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 55,
    "resultCount": 4,
    "totalHitCount": 4,
    "exactHitCount": true,
    "items": [
        {
            "id": 23412813,
            "attributes": [
                {
                    "name": "globalName",
                    "type": "string",
                    "value": "dilbert_dreaming.gif"
                },
...
                {
                    "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR.en_EN",
                    "type": "string",
                    "value": "Masha english"
                },
                {
                    "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR.de_DE",
                    "type": "string",
                    "value": "Masha deutsch"
                },
                {
                    "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR.fr_FR",
                    "type": "string",
                    "value": "Masha francais"
                },
...
            ]
        },
...
    ],
    "facets": []
}
Field query on multilingual field

When querying the content of multilingual fields the language parameter has to be provided. Otherwise an empty result will be returned because there is no default language.

Sample request querying a multilingual field:
{
    "context": {
        "searchType": "INDEX",
        "index": "ASSET"
    },
    "query": {
        "queryType": "FIELD",
        "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR",
        "value": "deutsch"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "aggregationEnabled": true,
    "language": "de_DE"
}
Sample response for dedicated content language:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 30,
    "resultCount": 4,
    "totalHitCount": 4,
    "exactHitCount": true,
    "items": [
        {
            "id": 23412813,
            "attributes": [
                {
                    "name": "globalName",
                    "type": "string",
                    "value": "dilbert_dreaming.gif"
                },
...
                {
                    "name": "ISYObject~metaDataAttributeValues~MASHA_LANG_DEP_ATTR",
                    "type": "string",
                    "value": "Masha deutsch"
                },
...
            ]
        },
...
    ],
    "facets": []
}
Aggregations on multilingual fields

Aggregations on multilingual fields will only include the language variant of the dedicated content language. If the language parameter is missing in the search request an empty result will be returned for the multilingual field because there is no default language.

NOTE: This is still work in progress.

.3.10. Error handling

For errors that can be handled by the client the REST API returns the http status code 400. The message contains a key that can be evaluated by the client. For all other errors, the http status code 500 is returned.

Table 16. Http status codes:
HTTP Status code meaning

200

OK

400

Bad request

500

Internal server error

Table 17. Bad Request error keys:
Localization key value

INVALID_QUERY_SYNTAX

Query syntax of fulltext query could not be parsed.

.4. Suggest resource

The suggest resource provides completion suggestions for user input which is useful for a search-as-you-type functionality. The client can send suggest requests for every key typed by the user and the suggest resource will return a list of possible completions of the user input.

Table 18. Details

Resource path

/api/v1/search/suggest

HTTP method

POST

Content type

application/json

Response type

application/json

Table 19. Request parameters
Name Description Required

index

Index type (ASSET, PRODUCT, CHANNEL or GLOBAL)

*

text

User input text (min length = 3)

*

count

Number of suggestions (default = 10, max = 20)

.4.1. Suggest terms for user input

Request:
{
    "index": "ASSET",
    "text": "tes"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 17,
    "suggestions": [
        "/Test_ANA2/22980501templatePreview.png",
        "/test7/assets/help/help_cz_CZ.csv",
        "/test7/assets/help/help_de_AT.csv",
        "/test7/assets/help/help_de_CH.csv",
        "/test7/assets/help/help_de_DE.csv",
        "/test7/assets/help/help_en_GB.csv",
        "/test7/assets/help/help_en_IE.csv",
        "/test7/assets/help/help_en_US.csv",
        "/test7/assets/help/help_es_ES.csv",
        "/test_ANA/22595740templatePreview.png"
    ]
}

.4.2. Suggest terms for user input with individual count

Request:
{
    "index": "PRODUCT",
    "text": "tes",
    "count": 20
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 19,
    "suggestions": [
        "TEST_Artikel",
        "TEST_DEF1",
        "TEST_DEF2",
        "TEST_DEF3",
        "TEST_DEF4",
        "TEST_DEF5",
        "TEST_DEF6",
        "TEST_DEF7",
        "TEST_DEF8",
        "TEST_Neu",
        "TEST_Neu2",
        "Test-2988",
        "Test_Art",
        "Test_Article_01",
        "Test_Node_1",
        "test",
        "test art 6",
        "test art1",
        "test art7",
        "test art_1"
    ]
}

.5. Advanced Suggest resource

In comparison with the suggest resource this advanced one provides more powerful completion suggestions for user input.

It supports the search from any position (e.g. from the middle) of the text and allows the distance between the search words. The results contain the html tag <em></em> to point out the position of the searched words in the text.

Table 20. Details

Resource path

/api/v1/search/type-ahead

HTTP method

POST

Content type

application/json

Response type

application/json

Table 21. Request parameters
Name Description Required

index

Index type (ASSET, PRODUCT, CHANNEL or GLOBAL)

*

text

User input text (min length = 3)

*

slop

The distance between the searched words (default = 3)

count

Number of suggestions (default = 10)

.5.1. Suggest terms for user input

Request:
{
    "index": "ASSET",
    "text": "this tes",
    "count": 20,
    "slop": 3
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 17,
    "suggestions": [
        "<em>this</em><em>tests</em>",
        "<em>this</em> is a large <em>test</em>",
        "<em>this</em> is <em>test1</em>",
        "oh, <em>this</em> is not a <em>test2</em>"
    ],
    "corrections": []
}

.5.2. Suggest corrections for user input

It can also provide the potential corrections if the searched words cannot be found. It is useful in case when the user has some spelling mistakes.

Request:
{
    "index": "GLOBAL",
    "text": "thet"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 17,
    "suggestions": [
    ],
    "corrections": [
      "test",
      "text"
    ]
}

.6. Stored search resource

The resource provides functions for loading and saving search profiles ("stored searches").

.6.1. Load list of stored searches of current user

Loads a list of stored searches of the current user. The list entries contain the id, index type, and name of a saved search.

Example:

Table 22. Details

Resource path

/api/v1/search/storedsearch

HTTP method

GET

Content type

application/json

Response type

application/json

Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 19,
    "storedSearchEntries": [
        {
            "id": 1,
            "index": "ASSET",
            "name": "Find all jpg images"
        },
        {
            "id": 2,
            "index": "ASSET",
            "name": "11.21.2019 17:02:40"
        },
        {
            "id": 3,
            "index": "PRODUCT",
            "name": "11.21.2019 17:03:17"
        },
        {
            "id": 4,
            "index": "CHANNEL",
            "name": "11.21.2019 17:03:51"
        },
        {
            "id": 5,
            "index": "GLOBAL",
            "name": "Find all with state incomplete"
        }
    ]
}
Table 23. Http status codes:

200

OK

500

Internal server error

.6.2. Load list of stored searches of current user by index type

Loads a list of stored searches of the current user by index type. The list entries contain the id, index type, and name of a saved search.

Example:

Table 24. Details

Resource path

/api/v1/search/storedsearch

HTTP method

GET

Parameter type

URL parameter

Response type

application/json

Table 25. Request parameters
Name Description Required

index

Index type (ASSET, PRODUCT, CHANNEL or GLOBAL). If URL parameter is missing, all index types are returned.

(*)

Request:
/api/v1/search/storedsearch?index=ASSET
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 19,
    "storedSearchEntries": [
        {
            "id": 1,
            "index": "ASSET",
            "name": "Find all jpg images"
        },
        {
            "id": 2,
            "index": "ASSET",
            "name": "11.21.2019 17:02:40"
        }
    ]
}
Table 26. Http status codes:

200

OK

500

Internal server error

.6.3. Load list of stored searches of current user by config id

Loads a list of stored searches of the current user by plugin config id. The list entries contain the id, index type, and name of a saved search.

Example:

Table 27. Details

Resource path

/api/v1/search/storedsearch

HTTP method

GET

Parameter type

URL parameter

Response type

application/json

Table 28. Request parameters
Name Description Required

configId

Id of plugin backend configuration. If URL parameter is missing, all stored searches of the user are returned.

(*)

Request:
/api/v1/search/storedsearch?configId=22459895
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 19,
    "storedSearchEntries": [
        {
            "id": 1,
            "index": "ASSET",
            "name": "Find all jpg images"
        },
        {
            "id": 2,
            "index": "ASSET",
            "name": "11.21.2019 17:02:40"
        }
    ]
}
Table 29. Http status codes:

200

OK

500

Internal server error

.6.4. Load a stored search by id

Loads a stored search by id. The returned search object can be used directly to execute the corresponding search.

Example:

Table 30. Details

Resource path

/api/v1/search/storedsearch

HTTP method

GET

Parameter

Stored search ID

Parameter type

Path parameter

Response type

application/json

Request:
/api/v1/search/storedsearch/1
Response:
{
    "context": {
        "searchType": "CONFIG",
        "configId": 22459895
    },
    "query": {
        "queryType": "FULLTEXT",
        "value": "jpg"
    },
    "maxResults": 10000,
    "pageIndex": 1,
    "pageSize": 10,
    "sortOptions": [
        {
            "attribute": "ISYObject~modificationDate",
            "direction": "DESC"
        }
    ],
    "aggregationEnabled": true,
    "aggregationMaxResults": 10,
    "resultAttributes": [
        "ISYImage~imageStorageInfo~heightInPixel",
        "ISYImage~imageStorageInfo~colorspace"
    ]
}
Table 31. Http status codes:

200

OK

404

Not found

500

Internal server error

.6.5. Store search for current user

Stores a search object for the current user.

Example:

Table 32. Details

Resource path

/api/v1/search/storedsearch

HTTP method

POST

Content type

application/json

Response type

application/json

Table 33. Request parameters
Name Description Required

name

Name of stored search. Note: Parameter is optional. If the parameter is missing or empty, the name is created automatically.

searchObject

Search object to be stored

*

Request:
{
    "name": "My stored search",
    "searchObject": {
        "context": {
            "searchType": "CONFIG",
            "configId": 22459895
        },
        "query": {
            "queryType": "FULLTEXT",
            "value": "jpg"
        },
        "maxResults": 10000,
        "pageIndex": 1,
        "pageSize": 10,
        "sortOptions": [
            {
                "attribute": "ISYObject~modificationDate",
                "direction": "DESC"
            }
        ],
        "aggregationEnabled": true,
        "aggregationMaxResults": 10,
        "resultAttributes": [
            "ISYImage~imageStorageInfo~heightInPixel",
            "ISYImage~imageStorageInfo~colorspace"
        ]
    }
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 40,
    "id": 1,
    "name": "My stored search"
}
Table 34. Http status codes:

201

Store search successfull

500

Internal server error

.6.6. Update stored search of current user

Updates a stored search of the current user.

Example:

Table 35. Details

Resource path

/api/v1/search/storedsearch

HTTP method

PATCH

Parameter

Stored search ID

Parameter type

Path parameter

Content type

application/json

Response type

application/json

Table 36. Request parameters
Name Description Required

name

Name of stored search. Note: Parameter is optional. If the parameter is missing or empty, the name is created automatically.

searchObject

Search object to be stored

Request:
/api/v1/search/storedsearch/1
Request body:
{
    "name": "My stored search with a new name",
    "searchObject": {
        "context": {
            "searchType": "CONFIG",
            "configId": 22459895
        },
        "query": {
            "queryType": "FULLTEXT",
            "value": "jpg"
        },
        "maxResults": 10000,
        "pageIndex": 1,
        "pageSize": 10,
        "sortOptions": [
            {
                "attribute": "ISYObject~modificationDate",
                "direction": "DESC"
            }
        ],
        "aggregationEnabled": true,
        "aggregationMaxResults": 10,
        "resultAttributes": [
            "ISYImage~imageStorageInfo~heightInPixel",
            "ISYImage~imageStorageInfo~colorspace"
        ]
    }
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 40,
    "id": 1,
    "name": "My stored search with a new name"
}
Table 37. Http status codes:

200

Update successfull

404

Not found

500

Internal server error

.6.7. Rename stored search of current user

Renames a stored search of the current user.

"Rename" is the same operation as "Update", but without passing a search object.

Example:

Table 38. Details

Resource path

/api/v1/search/storedsearch

HTTP method

PATCH

Parameter

Stored search ID

Parameter type

Path parameter

Content type

application/json

Response type

application/json

Table 39. Request parameters
Name Description Required

name

Name of stored search. Note: Parameter is optional. If the parameter is missing or empty, the name is created automatically.

Request:
/api/v1/search/storedsearch/1
Request body:
{
    "name": "My stored search with a new name"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 40,
    "id": 1,
    "name": "My stored search with a new name"
}
Table 40. Http status codes:

200

Update successfull

404

Not found

500

Internal server error

.6.8. Delete stored search of current user

Deletes a stored search of the current user.

Example:

Table 41. Details

Resource path

/api/v1/search/storedsearch

HTTP method

DELETE

Parameter

Stored search ID

Parameter type

Path parameter

Content type

application/json

Response type

Empty response

Request:
/api/v1/search/storedsearch/1
Table 42. Http status codes:

204

Delete successfull

404

Not found

500

Internal server error

.7. History resource

The history resource provides all search histories of the user so that the user can reuse/rerun the old search easily. All histories are stored in the search index HISTORY.

.7.1. Query the search history

Query the histories of the user under a certain context.

If no context is setted, all histories of the user will be returned. Otherwise only the histories of the given context will be returned.

The results are sorted by the timestamp of the histories when they are added/updated.

Example:

Table 43. Details

Resource path

/api/v1/search/history

HTTP method

GET

Content type

application/json

Response type

application/json

Table 44. Request parameters
Name Description Required

user

The user whom the histories belong to

*

context

The search context which depends on the concrete use cases. (default = ‘DEFAULT’)

text

The search text. If empty, it returns all histories of the current user.

count

Number of histories (default = 10)

Request:
{
    "user": "user",
    "text": "sear",
    "context": "context",
    "count": 10
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 27,
    "histories": [
      "test <em>search3</em>",
      "test <em>search2</em>",
      "test <em>search1</em>"
    ]
}

.7.2. Add/Update the search history

Add a history into the search index.

The history will be stored under the context of the user. If no context is setted, it will be stored under the DEFAULT context.

If the history with the same content exists already, then update its timestamp.

Example:

Table 45. Details

Resource path

/api/v1/search/history

HTTP method

POST

Content type

application/json

Response type

application/json

Table 46. Request parameters
Name Description Required

user

The user whom the current history belongs to

*

text

The search history to be saved

*

context

The search context which depends on the concrete use cases. (default = ‘DEFAULT’)

Request:
{
    "user": "user",
    "text": "test search",
    "context": "context"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 27,
    "added": {
       "id": 10001,
       "text": "test search",
       "user": "user",
       "context": "context"
    }
}

.7.3. Delete the search history

Delete the histories of the user.

If the context are setted, it will delete all histories only under the given context. Otherwise it will delete the histories under all contexts of the user.

The response will tell how many histories are deleted.

Example:

Table 47. Details

Resource path

/api/v1/search/history

HTTP method

DELETE

Content type

application/json

Response type

application/json

Table 48. Request parameters
Name Description Required

user

The user whom the to be deleted histories belong to

*

context

The search context which depends on the concrete use cases. (default = ‘DEFAULT’)

Request:
{
    "user": "user",
    "context": "context"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 20,
    "deleted": {
      "user": "user",
      "context": "context",
      "count": 5
    }
}

.8. Index command resource

The index command resource can be used to start an index rebuild or to query the state of a current index rebuild.

During an index rebuild, various events are processed:

Table 49. Details

PREPARE

CREATE_INDEX

ADD_DOCUMENTS

SET_ALIAS

PROCESS_DELTA

DELETE_OLD_INDEX

END

ERROR

.8.1. Start index rebuild

Starts the index rebuild of specified index.

Example:

Table 50. Details

Resource path

/api/v1/search/index

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "index": "PRODUCT",
    "command": "REBUILD"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 0,
    "index": "PRODUCT",
    "event": "CREATE_INDEX",
    "documentsProcessed": 0,
    "totalDocuments": 0,
    "command": "REBUILD"
}
Table 51. Http status codes:

200

OK

500

Internal server error

.8.2. Query state of index rebuild

Queries the rebuild state of a specified index.

Example:

Table 52. Details

Resource path

/api/v1/search/index

HTTP method

POST

Content type

application/json

Response type

application/json

Request:
{
    "index": "PRODUCT",
    "command": "STATE"
}
Response:
{
    "apiVersion": "{project-version}",
    "processingTimeMillis": 0,
    "index": "PRODUCT",
    "event": "END",
    "documentsProcessed": 5982,
    "totalDocuments": 5982,
    "command": "STATE"
}
Table 53. Http status codes:

200

OK

500

Internal server error

.8.3. Query states of all indizes

Queries the states of all indizes in one request. It will return both the mapping state and indexing state.

The mapping state shows whether the search index mapping is out of date and the creation date of the current mapping.

The indexing state shows whether the indexing/re-indexing process is still running. It has following 3 values.

BUSY

The indexing/re-indexing process is still running.

END

The last indexing/re-indexing process is done. Currently there is no indexing process running.

ERROR

The last indexing/re-indexing process is done with error. Currently there is no indexing process running.

Example:

Table 54. Details

Resource path

/api/v1/search/index/state

HTTP method

GET

Response type

application/json

Response:
[
  {
    "index": "PRODUCT",
    "mappingState": {
      "outdated": false,
      "createdAt": "2021-09-29T16:29:17.312+02:00"
    },
    "indexingState": {
      "state": "END",
      "documentsProcessed": 3514,
      "totalDocuments": 3514
    }
  },
  {
    "index": "ASSET",
    "mappingState": {
      "outdated": false,
      "createdAt": "2021-09-29T15:38:59.569+02:00"
    },
    "indexingState": {
      "state": "BUSY",
      "documentsProcessed": 1500,
      "totalDocuments": 8901
    }
  }
]
Table 55. Http status codes:

200

OK

500

Internal server error

.9. Fields resource

The field resource can be used to query all fields that are available for the different indices. Each field description contains information if it is aggretable, sortable, multilingual etc. For queries based on this information either use the ("fieldName") or the ("attrIdentifier")(partial OMN-Expression).

Table 56. Details

Resource path

/api/v1/search/fields

HTTP method

GET

Query

indexType

Response type

application/json

Request:
/api/v1/search/fields?indexType=PRODUCT
Response:
[
  {
    "fieldName": "WE_VKFAKTOR1",
    "label": "WE_VKFAKTOR1",
    "fieldType": "double",
    "aggregatable": false,
    "sortable": true,
    "multilingual": false,
    "attrIdentifier": "WE_VKFAKTOR1",
    "nestedFields": null
  },
  {
    "fieldName": "WE_VKFAKTOR2",
    "label": "WE_VKFAKTOR2",
    "fieldType": "double",
    "aggregatable": false,
    "sortable": true,
    "multilingual": false,
    "attrIdentifier": "WE_VKFAKTOR2",
    "nestedFields": null
  },
  {
    "fieldName": "WE_REST_ART_ABOGEEIGNET",
    "label": "WE_REST_ART_ABOGEEIGNET",
    "fieldType": "boolean",
    "aggregatable": true,
    "sortable": true,
    "multilingual": false,
    "attrIdentifier": "WE_REST_ART_ABOGEEIGNET",
    "nestedFields": null
  }
]

.10. Configuration Options

The search project could be configured and customized by setting the options in the file "elasticsearch.properties". It supports following options:

Table 57. Options Description
Name Description

es.index.asset.fields.aggregatable

Aggregatable fields list in 'asset' index which are separated with ','

Field name must be the expression path in OMN.

e.g. ISYVideo.videoStorageInfo.title,ISYVideo.videoStorageInfo.name

es.index.channel.fields.aggregatable

Aggregatable fields list in 'channel' index which are separated with ','

Field name must be same as which defined in elastic search channel index.

e.g. Configuration~MAM_CONFIG_REMOVE_BG_API_KEY

es.index.product.fields.aggregatable

Aggregatable fields list in 'product' index which are separated with ','

Field name must be same as which defined in elastic search product index.

e.g. STRING_SINGLE_DOMAIN_ANV_LAZY_5_10

es.omn.operator.like.tokenized

Accept the boolean value and default value is 'true'.

Make the backend rule of operator 'like' to work on the tokenized text or not.

@Deprecated Because the database based search cannot do tokenization.

Welcome to the AI Chat!

Write a prompt to get started...