Search version 2¶
Important
Search version 2 is in beta phase.
New in version 25.2.
With this version VidiCore introduces the new search version 2. This search version works with the same basic principles described in Searching and OpenSearch as the backend.
Note
For more information about the new search document and how to use it see, Search version 2 (beta).
Search requests¶
Tip
If the SearchDocument is sent without values, a search for the type is automatically performed. The type is defined by the API-endpoint:
- /search2: type =
item and collection
- /search2/item: type =
item
- /search2/collection: type =
collection
- /search2/file: type =
file
- /search2/shape: type =
shape
- /search2: type =
The result will be all index entries matching this type.
Overall search¶
-
PUT
/search2
¶ Performs an overall search for items and collections. A search with an empty search body results in a search for all items and collections.
Content Parameters: See item-content
Query Parameters: - p (string) – Comma-separated list of paths specifying the content to include. Overrides the content and filter parameters.
- content (string) – Comma-separated list of the types of content to retrieve.
Valid values are
metadata
,uri
,shape
,poster
,thumbnail
,access
,merged-access
,external
. - interval (string) –
Comma-separated list
- time-span - Filter out metadata, return only metadata for specified time span.
generic
- Return all non-timed metadata.all
(default) - Return all metadata, same asinterval=generic,-INF-+INF
result
- Can be used when retrieving metadata from a search result. Will return time spans that overlap with the search result. (New in 5.5.)
- field (string) –
Comma-separated list.
- field-name - Return specified field.
- field-name ”:” new-name - Return specified field, renamed to a new name in return value.
- “-” field-name - Exclude specified field.
- (default) - Return all fields.
- group (string) –
Comma-separated list.
- group-name - Return specified group.
- group-name
+
- Return specified group and subgroups. - group-name
:
new-name - Return specified group, renamed to a new name in return value. -
group-name - Exclude specified group.- (default) - Return all groups.
- language (string) –
Comma-separated list.
- language-tag -
Return metadata for specific language, e.g.
en_US
. Wildcards may be used, e.g.*_CA
for both Canadian French and Canadian English. none
- Return all metadata without language specification.all
(default) - Return all metadata, with or without language specification.
- language-tag -
Return metadata for specific language, e.g.
- sampleRate (string) – Convert all outgoing time instants to specified rate. NB! Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
- track (string) –
Comma-separated list.
- track-type track-number -
Return metadata for specified track. Example of track is
A2
. - track-type t1
-
t2 - Return metadata for specified track interval, e.g.A2-4
. - track-type
*
- Return metadata for all tracks of specified type, e.g.A*
. generic
- Return all non-tracked metadata.all
(default) - All metadata, with or without track specification, are returned.
- track-type track-number -
Return metadata for specified track. Example of track is
- include (string) – A list of keys. Includes additional field specific data.
Additionally, if set to
type
the type definition of the field will be retrieved. - includeValues (boolean) – Return the value enumeration for each metadata field.
- conflict (string) –
yes
(default) - Include all metadata conflicts, unresolved.no
- Return conflicts resolved according to field rules.
- terse (string) –
yes
- Return metadata in terse format.no
(default) - Return metadata in verbose format.
- defaultValue (boolean) –
true
- For unset fields, return default values.false
(default) - Do not return default values.
- includeTransientMetadata (boolean) –
true
(default) - Include transient metadata.false
- Do not include transient metadata in response.
- revision (string) – Specifying which metadata revision to display. Only used if requesting a single item or collection.
- mergedType (string) – The type of operation to check for.
- mergedPermission (string) – The lowest required permission level.
- mergedExtradata (string) – Any possible extra data.
- uriType (string) – Comma-separated list of format types (container format) to return.
- scheme (string) – URI scheme to return.
- storageType (string) – Only return URIs for files from storages of this type.
- methodType (string) –
AUTO
- Gives an APInoauth URI to the media. Access to file is tunneled through VidiCore.AZURE_SAS
- If the storage schema is azure:// you can get direct access to the media. The resulting URI will not tunnel through VidiCore but rather point directly to the media location at the Azure storage.
- methodMetadata (string) – Metadata used with storage method.
- tag (string) – A URI parameter: Comma-separated list of shape tags to return.
- version (string) – Specifying which essence version to return for shapes.
If special value
all
, display all versions. If special valuelatest
(default), display latest version of shapes. - closedFiles (boolean) –
true
(default) - Return only URIs that point to closed files.false
- Return all URIs.
- storage (string[]) – List of storage ids. Return only files from specific storages. Can be specified multiple times.
- storageGroup (string) – Storage group id. Return only files from storages specified in the storage group.
- first (integer) – From the resulting list of items, start return list from specified offset.
Default is
1
, start return list from beginning. - number (integer) – The number of entities to fetch.
Default is
100
. - baseURI (string) – Which base URI to use for the thumbnail URLs.
- cursor (string) –
New in version 4.16.
*
- The initial cursor.string-from-search
- Cursor string returned from the search results.
If set, the cursorMark / search after features from Solr/OpenSearch would be used to improve the deep paging performance during a search.
When
cursor
is used, The value offirst
will be ignored.Changed in version 5.5.
Starting in 5.5, cursor is returned for the end of the result instead of null to enable tailing search.
Accepts: - application/xml, application/json – SearchDocument
Produces: - application/xml, application/json – SearchResultDocument
Search items¶
-
PUT
/search2/item
¶ Performs a search only for items. To retrieve all items, a search with an empty SearchDocument can be performed.
Content Parameters: See item-content
Query Parameters: - p (string) – Comma-separated list of paths specifying the content to include. Overrides the content and filter parameters.
- content (string) – Comma-separated list of the types of content to retrieve.
Valid values are
metadata
,uri
,shape
,poster
,thumbnail
,access
,merged-access
,external
. - interval (string) –
Comma-separated list
- time-span - Filter out metadata, return only metadata for specified time span.
generic
- Return all non-timed metadata.all
(default) - Return all metadata, same asinterval=generic,-INF-+INF
result
- Can be used when retrieving metadata from a search result. Will return time spans that overlap with the search result. (New in 5.5.)
- field (string) –
Comma-separated list.
- field-name - Return specified field.
- field-name ”:” new-name - Return specified field, renamed to a new name in return value.
- “-” field-name - Exclude specified field.
- (default) - Return all fields.
- group (string) –
Comma-separated list.
- group-name - Return specified group.
- group-name
+
- Return specified group and subgroups. - group-name
:
new-name - Return specified group, renamed to a new name in return value. -
group-name - Exclude specified group.- (default) - Return all groups.
- language (string) –
Comma-separated list.
- language-tag -
Return metadata for specific language, e.g.
en_US
. Wildcards may be used, e.g.*_CA
for both Canadian French and Canadian English. none
- Return all metadata without language specification.all
(default) - Return all metadata, with or without language specification.
- language-tag -
Return metadata for specific language, e.g.
- sampleRate (string) – Convert all outgoing time instants to specified rate. NB! Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
- track (string) –
Comma-separated list.
- track-type track-number -
Return metadata for specified track. Example of track is
A2
. - track-type t1
-
t2 - Return metadata for specified track interval, e.g.A2-4
. - track-type
*
- Return metadata for all tracks of specified type, e.g.A*
. generic
- Return all non-tracked metadata.all
(default) - All metadata, with or without track specification, are returned.
- track-type track-number -
Return metadata for specified track. Example of track is
- include (string) – A list of keys. Includes additional field specific data.
Additionally, if set to
type
the type definition of the field will be retrieved. - includeValues (boolean) – Return the value enumeration for each metadata field.
- conflict (string) –
yes
(default) - Include all metadata conflicts, unresolved.no
- Return conflicts resolved according to field rules.
- terse (string) –
yes
- Return metadata in terse format.no
(default) - Return metadata in verbose format.
- defaultValue (boolean) –
true
- For unset fields, return default values.false
(default) - Do not return default values.
- includeTransientMetadata (boolean) –
true
(default) - Include transient metadata.false
- Do not include transient metadata in response.
- revision (string) – Specifying which metadata revision to display. Only used if requesting a single item or collection.
- mergedType (string) – The type of operation to check for.
- mergedPermission (string) – The lowest required permission level.
- mergedExtradata (string) – Any possible extra data.
- uriType (string) – Comma-separated list of format types (container format) to return.
- scheme (string) – URI scheme to return.
- storageType (string) – Only return URIs for files from storages of this type.
- methodType (string) –
AUTO
- Gives an APInoauth URI to the media. Access to file is tunneled through VidiCore.AZURE_SAS
- If the storage schema is azure:// you can get direct access to the media. The resulting URI will not tunnel through VidiCore but rather point directly to the media location at the Azure storage.
- methodMetadata (string) – Metadata used with storage method.
- tag (string) – A URI parameter: Comma-separated list of shape tags to return.
- version (string) – Specifying which essence version to return for shapes.
If special value
all
, display all versions. If special valuelatest
(default), display latest version of shapes. - closedFiles (boolean) –
true
(default) - Return only URIs that point to closed files.false
- Return all URIs.
- storage (string[]) – List of storage ids. Return only files from specific storages. Can be specified multiple times.
- storageGroup (string) – Storage group id. Return only files from storages specified in the storage group.
- first (integer) – From the resulting list of items, start return list from specified offset.
Default is
1
, start return list from beginning. - number (integer) – The number of entities to fetch.
Default is
100
. - starttc (boolean) –
true
- Interval is given relative to start timecode of item.false
(default) - Interval is 0-based.
- cursor (string) –
New in version 4.16.
*
- The initial cursor.string-from-search
- Cursor string returned from the search results.
If set, the cursorMark / search after features from Solr/OpenSearch would be used to improve the deep paging performance during a search.
When
cursor
is used, The value offirst
will be ignored.Changed in version 5.5.
Starting in 5.5, cursor is returned for the end of the result instead of null to enable tailing search.
- result (string) –
list
(default) -
Return a list of items. -
library
- Create a library with the matching items. - libraryId (string) – If set, the library identified by this id will be used instead of creating a new library.
- autoRefresh (boolean) – When creating a library, make it self-refresh. Default is
false
. - updateMode (string) – When creating a library, use this update mode. Default is
MERGE
. - updateFrequency (string) – When creating a library, use this update frequency. Defaults to no periodic updates.
Accepts: - application/xml, application/json – SearchDocument
Produces: - application/xml, application/json – ItemListDocument
Search collections¶
-
PUT
/search2/collection
¶ Performs a search only for collections. To retrieve all collections, a search with an empty SearchDocument can be performed.
Content Parameters: See collection-content
Query Parameters: - content (string) – Comma-separated list of additional content to retrieve.
Valid values are:
metadata
,merged-access
,external
. - interval (string) –
Comma-separated list
- time-span - Filter out metadata, return only metadata for specified time span.
generic
- Return all non-timed metadata.all
(default) - Return all metadata, same asinterval=generic,-INF-+INF
result
- Can be used when retrieving metadata from a search result. Will return time spans that overlap with the search result. (New in 5.5.)
- field (string) –
Comma-separated list.
- field-name - Return specified field.
- field-name ”:” new-name - Return specified field, renamed to a new name in return value.
- “-” field-name - Exclude specified field.
- (default) - Return all fields.
- group (string) –
Comma-separated list.
- group-name - Return specified group.
- group-name
+
- Return specified group and subgroups. - group-name
:
new-name - Return specified group, renamed to a new name in return value. -
group-name - Exclude specified group.- (default) - Return all groups.
- track (string) –
Comma-separated list.
- track-type track-number -
Return metadata for specified track. Example of track is
A2
. - track-type t1
-
t2 - Return metadata for specified track interval, e.g.A2-4
. - track-type
*
- Return metadata for all tracks of specified type, e.g.A*
. generic
- Return all non-tracked metadata.all
(default) - All metadata, with or without track specification, are returned.
- track-type track-number -
Return metadata for specified track. Example of track is
- language (string) –
Comma-separated list.
- language-tag -
Return metadata for specific language, e.g.
en_US
. Wildcards may be used, e.g.*_CA
for both Canadian French and Canadian English. none
- Return all metadata without language specification.all
(default) - Return all metadata, with or without language specification.
- language-tag -
Return metadata for specific language, e.g.
- sampleRate (string) – Convert all outgoing time instants to specified rate. NB! Time codes which cannot be expressed in an integer number of samples will be returned as a decimal number, with risk of losing precision.
- conflict (string) –
yes
(default) - Include all metadata conflicts, unresolved.no
- Return conflicts resolved according to field rules.
- include (string) – A list of keys. Includes additional field specific data.
Additionally, if set to
type
the type definition of the field will be retrieved. - defaultValue (boolean) –
true
- For unset fields, return default values.false
(default) - Do not return default values.
- includeTransientMetadata (boolean) –
true
(default) - Include transient metadata.false
- Do not include transient metadata in response.
- includeValues (boolean) – Return the value enumeration for each metadata field.
- terse (string) –
yes
- Return metadata in terse format.no
(default) - Return metadata in verbose format.
- revision (string) – Specifying what revision of metadata to display. Only used if requesting a single item or collection.
- mergedType (string) – The type of operation to check for.
- mergedPermission (string) – The lowest required permission level.
- mergedExtradata (string) – Any possible extra data.
- first (integer) – From the resulting list of items, start return list from specified offset.
Default is
1
, start return list from beginning. - number (integer) – The number of entities to fetch.
Default is
100
. - cursor (string) –
New in version 4.16.
*
- The initial cursor.string-from-search
- Cursor string returned from the search results.
If set, the cursorMark / search after features from Solr/OpenSearch would be used to improve the deep paging performance during a search.
When
cursor
is used, The value offirst
will be ignored.Changed in version 5.5.
Starting in 5.5, cursor is returned for the end of the result instead of null to enable tailing search.
Accepts: - application/xml, application/json – SearchDocument
Produces: - application/xml, application/json – CollectionListDocument
- content (string) – Comma-separated list of additional content to retrieve.
Valid values are:
Search shapes¶
-
PUT
/search2/shape
¶ Performs a search only for shapes. To retrieve all shapes, a search with an empty SearchDocument can be performed.
Query Parameters: - content (string) – Comma-separated list of the types of content to retrieve. One of
component
,metadata
,essenceVersion
,tag
,mimeType
and*
. - first (integer) – From the resulting list of items, start return list from specified offset.
Default is
1
, start return list from beginning. - number (integer) – The number of entities to fetch.
Default is
100
. - methodType (string) – Return URIs from storage methods with a particular type.
By default, return URLs with empty
methodType
. - storageType (string) – Only return URIs for files from storages of this type.
- methodMetadata (string[]) – metadata used with storage method.
- scheme (string) – URI scheme to return.
Accepts: - application/xml, application/json – SearchDocument
Produces: - application/xml, application/json – ShapeListDocument
- content (string) – Comma-separated list of the types of content to retrieve. One of
Search files¶
-
PUT
/search2/file
¶ Performs a search only for files. To retrieve all files, a search with an empty SearchDocument can be performed.
Query Parameters: - methodType (string) – Return URIs from storage methods with a particular type.
By default, return URLs with empty
methodType
. - storageType (string) – Only return URIs for files from storages of this type.
- methodMetadata (string[]) – metadata used with storage method.
- scheme (string) – URI scheme to return.
- first (integer) – From the resulting list of items, start return list from specified offset.
Default is
1
, start return list from beginning. - number (integer) – The number of entities to fetch.
Default is
100
.
Accepts: - application/xml, application/json – SearchDocument
Produces: - application/xml, application/json – FileListDocument
- methodType (string) – Return URIs from storage methods with a particular type.
By default, return URLs with empty