Skip to main content
Skip table of contents

UC Search for Items or Collections

Motivation

When you have a growing number of assets within your system, the ability to search the assets based on it’s metadata becomes increasingly important. VidiCore allows quick searching of assets with the help of the two supported search backends: Solr and OpenSearch. Each item and collection that gets added to the system becomes indexed in the search backend and updates to metadata also triggers reindex of the assets.

Example

To search for items or collections we can use the /search endpoint:

/API/search?content=metadata&field=event_type

Where we specify that we want the metadata returned and only the metadata field event_type and in the body we provide the value which we want to search for:

XML
<ItemSearchDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <field>
        <name>event_type</name>
        <value>goal</value>
    </field>
</ItemSearchDocument>

In this example we have both a collection and an item with the value we are looking for, which is reflected in the search result

CODE
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SearchResultDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <hits>2</hits>
    <entry start="-INF" end="+INF" type="Collection" id="VX-46">
        <collection>
            <id>VX-46</id>
            <metadata>
                <revision>VX-302,VX-301,VX-303,VX-306</revision>
                <timespan start="-INF" end="+INF">
                    <field uuid="4bb6d1e1-844e-4a19-970e-30f8bcefccb4" user="admin" timestamp="2022-05-16T13:11:39.330+02:00" change="VX-306">
                        <name>event_type</name>
                        <value uuid="b30c4f72-e577-4555-8f50-84df22fd3028" user="admin" timestamp="2022-05-16T13:11:39.330+02:00" change="VX-306">goal</value>
                    </field>
                </timespan>
            </metadata>
        </collection>
        <timespan start="-INF" end="+INF"/>
    </entry>
    <entry start="1200" end="1380" type="Item" id="VX-38">
        <item id="VX-38" start="1200" end="1380">
            <metadata>
                <revision>VX-190,VX-189,VX-192,VX-191,VX-305</revision>
                <timespan start="1200" end="1380">
                    <field uuid="91f8a252-2e0d-44b8-a9ce-751dd3bc4602" user="admin" timestamp="2022-05-16T12:41:01.132+02:00" change="VX-305">
                        <name>event_type</name>
                        <value uuid="d553b414-e6d2-4dba-984d-690fc8686d58" user="admin" timestamp="2022-05-16T12:41:01.132+02:00" change="VX-305">goal</value>
                    </field>
                </timespan>
            </metadata>
        </item>
        <timespan start="1200" end="1380"/>
    </entry>
</SearchResultDocument>

The value is found in the indefinite timespan on the collection and in the timespan 1200 to 1380 on the item.

If we instead only want to search for either items or collections, we can do the same query at there individual endpoints:

PUT /item

PUT /collection

Resources

https://apidoc.vidispine.com/latest/ref/search.html#id2

https://apidoc.vidispine.com/latest/ref/item/item.html#put--item

https://apidoc.vidispine.com/latest/ref/collection.html#put--collection

How to

https://apidoc.vidispine.com/latest/item/search.html

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.