Skip to main content
Skip table of contents

How to retrieve collection by name with exact match [VC UG]

Basically to get exact matching, use the "string-exact" field type.

Below we show you a more detailed explanation with example.


Detailed Explanation;

Example of a user scenario asked by a customer to Vidispine;

"Am I able to retrieve a specific collection by name, even if there are spaces in between?

For instance right now, doing a search for “test collection” also returns a collection called “test”.

It's like it is doing it for each whole word, is it possible to do an exact match?

When i do PUT http://<ipaddress>:8080/API/collection and pass in

CODE
<em>{
  "field": [
    {
      "name": "user",
      "value": [
        {
          "value": "example@google.com"
        }
      ]
    },
    {
      "name": "title",
      "value": [
        {
          "value": "temp"
        }
      ]
    }
  ]
},</em>

 I get back "temp1", "temp2", etc. But I only want to see if "temp" exists." 

Resolution;

Title is a string field, so the "exact match" is not available.

http://apidoc.vidispine.com/latest/item/metadata/metadata.html#string-vs-string-exact

But you can try to use phrase searches like;

CODE
<field>
<name>title</name>
<value>"my favorite collection"</value> <!--note the quotes-->
</field>

This is will find "my favorite collection", "this is my favorite collection", "my favorite collection in NY", but exclude "favorite collection", "my collection".

But searching for "temp" with still find both temp and temp1

http://apidoc.vidispine.com/latest/item/search.html#phrase-search

To get "exact match", you will need to create another metadata field with type string-exact and put the collection name there.

JavaScript errors detected

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

If this problem persists, please contact our support.