Logo Help Center

Elvis 5 REST API - search

Elvis 5 REST API - search

GET/POST

http://yourserver.com/services/search
    ?q=<query>
    &start=<first result>
    &num=<max result hits to return>
    &sort=<comma-delimited sort fields>
    &metadataToReturn=<comma-delimited fields>
    &facets=<comma-delimited fields>
    &facet.<field>.selection=<comma-delimited values>
    &appendRequestSecret=<true|false>

What does it do?

Search assets in Elvis.

The REST search method gives access to all the powerful search functions provided by the Elvis search engine. You can execute all possible queries and even use faceted search.

Apart from various types of metadata about the assets, the results returned by a search call also contain ready-to-use URLs to the thumbnail, preview and original file. This makes it extremely easy to display rich visual results.

Parameters

q

The query to search for, see Searching for files in Elvis by using a query.

Required.

start

First hit to be returned. Starting at 0 for the first hit. Used to skip hits to return 'paged' results.

Note: Search results above a total of 10,000 will not be returned due to technical limitations.

Optional. Default is 0.

num

Number of hits to return. Specify 0 to return no hits, this can be useful if you only want to fetch facets data.

Optional. Default is 50.

sort

The sort order of returned hits. Comma-delimited list of fields to sort on.

By default, date/time fields and number fields are sorted descending. All other fields are sorted ascending. To explicitly specify sort order, append "-desc" or "-asc: to the field. Some examples:

  • sort=name
  • sort=rating
  • sort=fileSize-asc
  • sort=status,assetModified-asc

A special sort case is relevance. This lets the search engine determine sorting based on the relevance of the asset against the search query. Relevance results are always returned descending.

Optional. Default is assetCreated-desc.

metadataToReturn

Comma-delimited list of metadata fields to return in hits. It is good practice to always specify just the metadata fields that you need. This will make the searches faster because less data needs to be transferred over the network.

metadataToReturn=name,rating,assetCreated

Specify "all", or omit to return all available metadata.

metadataToReturn=all

Leave 'empty' to return only minimal fields

metadataToReturn=

Optional. Default returns all fields.

facets

Comma-delimited list fields to return facet for. For example:

facets=tags,assetDomain

Selected values for a facet must be specified with a "facet.<field>.selection" parameter. Do not add selected items to the query since that will cause incorrect facet filtering.

Note: Only fields that are un_tokenized or tokenized with pureLowerCase analyzer can be used for faceted search

Optional. Default returns no facets.

facet.<field>.selection

Comma-delimited list of values that should be 'selected' for a given facet.

For example:

facet.tags.selection=beach

facet.assetDomain.selection=image,video

Optional.

format

Deprecated. Do not use this parameter, it will be removed in a future version of Elvis. Only the json format is supported.

  • json format is lightweight and very suitable for consumption using AJAX and JavaScript.
  • html format is the easiest way to embed results in HTML pages, but is heavier and less flexible than using a HitRenderer from our open-source JavaScript library.
  • xml format is the same as returned by the Elvis SOAP webservice search operation. This format is suitable for environments that do not support JSON parsing and work better with XML. When you use format=xml, error responses will also be returned in xml format.

Optional. Default is json.

appendRequestSecret

When set to true will append an encrypted code to the thumbnail, preview and original URLs. This is useful when the search is transformed to HTML by an intermediary (like a PHP or XSLT) and is then served to a web browser that is not authenticated against the server.

Optional. Default is false.

returnHighlightedText

(Requires Elvis 5.15 or higher) When set to true or when it is not passed, any found text is highlighted. (Applies only to assets with text as content. See Text, Office documents, presentations, PDFs below.) Set to false to turn text highlighting off.

Optional. Default is true.

Return value

An array of hits in JSON format. Each item in the array has the following properties.

firstResult

Index of the first result that is returned.

maxResultHits

Maximum number of hits that are returned.

totalHits

Total hits found by the search.

hits

  • id. Unique ID of the asset in Elvis.
  • permissions. String that indicates the permissions the current user has for the asset.
  • thumbnailUrl. (Only available for assets that have a thumbnail.) A URL to display the thumbnail of an asset.1
  • previewUrl. (Only available for assets that have a thumbnail.) A URL to display the default preview of an asset.1 The type of preview depends on the asset type.
  • originalUrl. A URL to download the original asset.1 This URL will only work if the user has the 'use original' permission for this asset. This can be checked with the 'permissions' property.
  • metadata. An object with metadata that was requested to be returned. Some metadata will always be returned. Fields that have date or datetime values and the field fileSize contain both the actual numerical value and a formatted value.

1 For information about the format of the URL, see Elvis 5 API - Previews. Examples:

"originalUrl" : "http://demo.elvisdam.com/file/6xNvbssC4-e9xWIkH3srpK/*/Elvis_Magazine.pdf?_=2",

"previewUrl" : "http://demo.elvisdam.com/preview/6xNvbssC4-e9xWIkH3srpK/previews/maxWidth_1600_maxHeight_1600_page_0.jpg/*/Elvis_Magazine_preview.jpg?_=1",

"thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/6xNvbssC4-e9xWIkH3srpK/*/Elvis_Magazine_thumb.jpg?_=1"

Examples

search

http://demo.elvisdam.com/services/search
    ?q=beach

This call searches for "beach". For examples of more advanced queries, see Searching for files in Elvis by using a query.

{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 8,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "6xNvbssC4-e9xWIkH3srpK",
    "metadata" : {
      "widthPt" : 595.276,
      "folderPath" : "/Demo Zone/Archive/Elvis Magazine",
      "created" : {
        "value" : 1333354075000,
        "formatted" : "2012-04-02 10:07:55 +0200"
      },
      "mimeType" : "application/pdf",
      "fileCreated" : {
        "value" : 1333355723000,
        "formatted" : "2012-04-02 10:35:23 +0200"
      },
      "numberOfPages" : 7,
      "versionNumber" : 1,
      "dimensionPt" : "595 x 842 pt",
      "xmpModifyDate" : {
        "value" : 1333354079000,
        "formatted" : "2012-04-02 10:07:59 +0200"
      },
      "assetDomain" : "pdf",
      "xmpCreated" : {
        "value" : 1333354075000,
        "formatted" : "2012-04-02 10:07:55 +0200"
      },
      "heightIn" : 11.692916666666665,
      "widthMm" : 210.0001444444444,
      "assetModified" : {
        "value" : 1335169013000,
        "formatted" : "2012-04-23 10:16:53 +0200"
      },
      "software" : "Adobe InDesign CS5.5 (7.5.2)",
      "height" : 842,
      "trappedPdf" : "False",
      "width" : 595,
      "modified" : {
        "value" : 1333354079000,
        "formatted" : "2012-04-02 10:07:59 +0200"
      },
      "assetModifier" : "admin",
      "fileSize" : {
        "value" : 2199938,
        "formatted" : "2.1 MB"
      },
      "name" : "Elvis_Magazine.pdf",
      "dimension" : "595 x 842 px",
      "previewState" : "yes",
      "assetPath" : "/Demo Zone/Archive/Elvis Magazine/Elvis_Magazine.pdf",
      "pdfVersion" : "1.5",
      "numberOfPreviewPages" : 7,
      "heightPt" : 841.89,
      "dimensionIn" : "8.27 x 11.69 inch",
      "assetFileModified" : {
        "value" : 1333355732000,
        "formatted" : "2012-04-02 10:35:32 +0200"
      },
      "fileType" : "PDF",
      "assetCreator" : "admin",
      "extension" : "pdf",
      "pdfProducer" : "Adobe PDF Library 9.9",
      "assetCreated" : {
        "value" : 1333355732000,
        "formatted" : "2012-04-02 10:35:32 +0200"
      },
      "assetType" : "pdf",
      "resolutionX" : 72.0,
      "assetFileModifier" : "admin",
      "resolutionY" : 72.0,
      "resolutionUnit" : 2,
      "fileModified" : {
        "value" : 1333355724000,
        "formatted" : "2012-04-02 10:35:24 +0200"
      },
      "resolution" : "72 px/inch",
      "dimensionMm" : "210 x 297 mm",
      "widthIn" : 8.267722222222222,
      "xmpMetadataDate" : {
        "value" : 1333354079000,
        "formatted" : "2012-04-02 10:07:59 +0200"
      },
      "creatorName" : "Adobe InDesign CS5.5 (7.5.2)",
      "heightMm" : 297.0000833333333,
      "filename" : "Elvis_Magazine.pdf",
      "thumbnailState" : "yes"
    },
    "highlightedText" : " has a 800 m \nlong and 30 m wide <B>beach</B> constructed. The pond is the biggest sport \npond, smaller pond, and two small ponds are ponds. Around the lakes \nand forests are footpaths. The domain is a known residence of a wide \nvariety of birds",
    "originalUrl" : "http://demo.elvisdam.com/file/6xNvbssC4-e9xWIkH3srpK/*/Elvis_Magazine.pdf?_=2",
    "previewUrl" : "http://demo.elvisdam.com/preview/6xNvbssC4-e9xWIkH3srpK/previews/maxWidth_1600_maxHeight_1600_page_0.jpg/*/Elvis_Magazine_preview.jpg?_=1",
    "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/6xNvbssC4-e9xWIkH3srpK/*/Elvis_Magazine_thumb.jpg?_=1"
  },
  {
    ...
  } ]
}

Images

Below is an example of how an image is returned.

{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 8,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "DHWrgjWCqg0ByPIdY5yM0G",
    "metadata" : {
      "widthPt" : 1281.6000000000001,
      "folderPath" : "/Demo Zone/Images/Travel/Landmarks",
      "usageRights" : "In house",
      "created" : {
        "value" : 1246626127000,
        "formatted" : "2009-07-03 15:02:07 +0200"
      },
      "bitsPerSample" : "8 8 8",
      "mimeType" : "image/jpeg",
      "copyright" : "Copyright by Nicolas Raymond",
      "fileCreated" : {
        "value" : 1332929221000,
        "formatted" : "2012-03-28 12:07:01 +0200"
      },
      "cameraModel" : "Canon EOS DIGITAL REBEL XSi",
      "versionNumber" : 1,
      "dimensionPt" : "1282 x 854 pt",
      "xmpModifyDate" : {
        "value" : 1332505018000,
        "formatted" : "2012-03-23 13:16:58 +0100"
      },
      "assetDomain" : "image",
      "xmpCreated" : {
        "value" : 1246626127000,
        "formatted" : "2009-07-03 15:02:07 +0200"
      },
      "tags" : [ "beach", "colorful", "peace", "relax", "sky" ],
      "heightIn" : 11.866666666666667,
      "termsAndConditionsURL" : "http://www.sxc.hu/help/7_2",
      "usageTerms" : "Standard SXC terms still apply, but I can no longer afford to give my pictures away free beyond the SXC commercial restrictions. This includes (but is not limited to) using my stock in designs for resale (i.e. posters, t-shirts, web templates, etc). For such extended commercial use, I would usually expect some compensation like a modest licensing fee or percentage commission...As much as I would like to continue offering my pictures free, I also want to make sure my photography isn't being exploited for mass monetary gain without receiving anything in return. If still interested, feel free to message me. I'd like to think I can offer good pricing for extended commercial use, comparable to what you might pay for a standard license on a typical paid microstock website. In many cases, I can also offer larger res files.",
      "widthMm" : 452.12,
      "imageType" : "photo",
      "public" : "True",
      "assetModified" : {
        "value" : 1335169024000,
        "formatted" : "2012-04-23 10:17:04 +0200"
      },
      "software" : "Adobe Photoshop CS3 Macintosh",
      "height" : 2848,
      "description" : "Singing Sands Beach at Basin Head in Prince Edward Island...HDR composite from 3 separate exposures.",
      "width" : 4272,
      "url" : "http://www.sxc.hu/photo/1262373, http://www.sxc.hu/photo/1262373",
      "modified" : {
        "value" : 1332505018000,
        "formatted" : "2012-03-23 13:16:58 +0100"
      },
      "focalLength" : 13.0,
      "assetModifier" : "admin",
      "exifVersion" : "0221",
      "fileSize" : {
        "value" : 747123,
        "formatted" : "730 KB"
      },
      "name" : "Singing Sands Beach.jpg",
      "dimension" : "4272 x 2848 px",
      "source" : "Stock.XCHNG",
      "previewState" : "yes",
      "compression" : 6,
      "orientation" : 1,
      "assetPath" : "/Demo Zone/Images/Travel/Landmarks/Singing Sands Beach.jpg",
      "iccProfileDescription" : "sRGB IEC61966-2.1",
      "iptcCreated" : {
        "value" : 1246626127000,
        "formatted" : "2009-07-03 15:02:07 +0200"
      },
      "heightPt" : 854.4000000000001,
      "dimensionIn" : "17.80 x 11.87 inch",
      "assetFileModified" : {
        "value" : 1332929225000,
        "formatted" : "2012-03-28 12:07:05 +0200"
      },
      "fileType" : "JPEG",
      "assetCreator" : "admin",
      "creatorCountry" : "Canada",
      "extension" : "jpg",
      "assetCreated" : {
        "value" : 1332929225000,
        "formatted" : "2012-03-28 12:07:05 +0200"
      },
      "assetType" : "jpg",
      "credit" : "Shot by Nicolas Raymond",
      "resolutionX" : 240.0,
      "assetFileModifier" : "admin",
      "status" : "Draft",
      "resolutionY" : 240.0,
      "resolutionUnit" : 2,
      "fileModified" : {
        "value" : 1335169025000,
        "formatted" : "2012-04-23 10:17:05 +0200"
      },
      "resolution" : "240 px/inch",
      "dimensionMm" : "452 x 301 mm",
      "widthIn" : 17.8,
      "creatorCity" : "Montreal",
      "xmpMetadataDate" : {
        "value" : 1332505018000,
        "formatted" : "2012-03-23 13:16:58 +0100"
      },
      "creatorName" : "Nicolas Raymond, Nicolas Raymond",
      "heightMm" : 301.41333333333336,
      "colorSpace" : "1",
      "filename" : "Singing Sands Beach.jpg",
      "rating" : 3,
      "thumbnailState" : "yes"
    },
    "originalUrl" : "http://demo.elvisdam.com/file/DHWrgjWCqg0ByPIdY5yM0G/*/Singing%20Sands%20Beach.jpg?_=5",
    "previewUrl" : "http://demo.elvisdam.com/preview/DHWrgjWCqg0ByPIdY5yM0G/previews/maxWidth_1600_maxHeight_1600.jpg/*/Singing%2520Sands%2520Beach_preview.jpg?_=1",
    "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/DHWrgjWCqg0ByPIdY5yM0G/*/Singing%20Sands%20Beach_thumb.jpg?_=1"
  },
  {
    ...
  } ]
}

Videos

search

http://demo.elvisdam.com/services/search
    ?q=trailer

Below is an example of how a video is returned.

{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 2,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "BW6EeoqxqWkAVfygVfEa29",
    "metadata" : {
      "widthPt" : 848.0,
      "folderPath" : "/Demo Zone/Video/Movie Trailers",
      "usageRights" : "Rights managed",
      "mimeType" : "video/mp4",
      "audioCodec" : "aac",
      "copyright" : "Copyright by Lionsgate, original story and characters by Suzanne Collins",
      "fileCreated" : {
        "value" : 1332928889000,
        "formatted" : "2012-03-28 12:01:29 +0200"
      },
      "versionNumber" : 1,
      "dimensionPt" : "848 x 352 pt",
      "assetDomain" : "video",
      "tags" : [ "hunger games", "lionsgate", "movie", "trailer" ],
      "heightIn" : 4.888888888888889,
      "termsAndConditionsURL" : "lionsgate.com/terms.html",
      "widthMm" : 299.15555555555557,
      "public" : "True",
      "assetModified" : {
        "value" : 1335169026000,
        "formatted" : "2012-04-23 10:17:06 +0200"
      },
      "height" : 352,
      "description" : "Cinematic trailer of The Hunger Games, based on the acclaimed novels of Suzanne Collins",
      "width" : 848,
      "url" : "thehungergamesmovie.com/",
      "assetModifier" : "admin",
      "fileSize" : {
        "value" : 10443993,
        "formatted" : "10 MB"
      },
      "name" : "The Hunger Games - Lionsgate - Trailer.mp4",
      "dimension" : "848 x 352 px",
      "source" : "Official movie website for international audiences",
      "creatorWebsite" : "www.lionsgate.com",
      "previewState" : "yes",
      "assetPath" : "/Demo Zone/Video/Movie Trailers/The Hunger Games - Lionsgate - Trailer.mp4",
      "heightPt" : 352.0,
      "dimensionIn" : "11.78 x 4.89 inch",
      "videoLength" : 70144,
      "assetFileModified" : {
        "value" : 1332928894000,
        "formatted" : "2012-03-28 12:01:34 +0200"
      },
      "fileType" : "MP4",
      "assetCreator" : "admin",
      "extension" : "mp4",
      "assetCreated" : {
        "value" : 1332928894000,
        "formatted" : "2012-03-28 12:01:34 +0200"
      },
      "assetType" : "mp4",
      "credit" : "By Lionsgate",
      "resolutionX" : 72.0,
      "assetFileModifier" : "admin",
      "status" : "Production",
      "resolutionY" : 72.0,
      "resolutionUnit" : 2,
      "fileModified" : {
        "value" : 1332928890000,
        "formatted" : "2012-03-28 12:01:30 +0200"
      },
      "resolution" : "72 px/inch",
      "dimensionMm" : "299 x 124 mm",
      "widthIn" : 11.777777777777779,
      "creatorName" : "Lionsgate",
      "heightMm" : 124.17777777777778,
      "filename" : "The Hunger Games - Lionsgate - Trailer.mp4",
      "rating" : 5,
      "thumbnailState" : "yes",
      "videoCodec" : "h264"
    },
    "originalUrl" : "http://demo.elvisdam.com/file/BW6EeoqxqWkAVfygVfEa29/*/The%20Hunger%20Games%20-%20Lionsgate%20-%20Trailer.mp4?_=1",
    "previewUrl" : "http://demo.elvisdam.com/preview/BW6EeoqxqWkAVfygVfEa29/previews/maxWidth_480_maxHeight_360.mp4/*/The%2520Hunger%2520Games%2520-%2520Lionsgate%2520-%2520Trailer_preview.mp4?_=1",
    "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/BW6EeoqxqWkAVfygVfEa29/*/The%20Hunger%20Games%20-%20Lionsgate%20-%20Trailer_thumb.jpg?_=1"
  },
  {
    ...
  } ]
}

Text, Office documents, presentations, PDFs

Most document formats that contain text will return a highlightedText property with part of the text from the document. This short excerpt can be displayed in your search results. If the document was found by matched metadata and not by its text content, the first few lines of text will be returned.

search
http://demo.elvisdam.com/services/search
?q=carnival
{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 6,
  "hits" : [ {
   "permissions" : "VPUM-----",
    "id" : "0DeNyXKhqjx81M2zeFYzuu",
    "metadata" : {
      "numberOfCharacters" : 3200,
      "folderPath" : "/Demo Zone/Archive/Elvis Daily/303/Fashion & Lifestyle",
      "numberOfLines" : 108,
      ...
      },
  "highlightedText" : "\n \n No alcohol allowed at <B>Carnival</B> in Venezuala \n \n \n <B>Carnival</B> is a festive season which occurs immediately before Lent; the main events are usually during February. <B>Carnival</B> typically involves a public celebration or parade combining some elements",
    "originalUrl" : "http://demo.elvisdam.com/file/0DeNyXKhqjx81M2zeFYzuu/*/Carnival%20Venezuela.icml?_=1",
    "previewUrl" : "http://demo.elvisdam.com/preview/0DeNyXKhqjx81M2zeFYzuu/previews/html/index.html?_=1"
  },
  {
    ...
  } ]
}

Some formats also support thumbnails. In this case they will have a thumbnail URL and a bit of highlighted text.

search
http://demo.elvisdam.com/services/search
    ?q=food
{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 6,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "Alf5A2S_Kn0A50T5I-lrqF",
    "metadata" : {
      "numberOfCharacters" : 41568,
      "folderPath" : "/Demo Zone/Office/Documents",
      "usageRights" : "Royalty free",
     ...
      },
   "highlightedText" : "<B>Food</B>\n\n<B>Food</B> is any substance[1] consumed to provide nutritional support for the body. It is usually of plant or animal origin, and contains essential nutrients, such as carbohydrates, fats, proteins, vitamins, or minerals. The substance is ingested",
    "originalUrl" : "http://demo.elvisdam.com/file/Alf5A2S_Kn0A50T5I-lrqF/*/Food%20history%20and%20culture.docx?_=1",
    "previewUrl" : "http://demo.elvisdam.com/preview/Alf5A2S_Kn0A50T5I-lrqF/previews/html/index.html?_=1",
    "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/Alf5A2S_Kn0A50T5I-lrqF/*/Food%20history%20and%20culture_thumb.jpg?_=1"
  },
  {
    ...
  } ]
}

Collections

Collections returned in the results have an additional array with up to 4 thumbnailHits. These are minimal sets of metadata for 4 of the assets contained by the collections. Because these are returned with the collections, your client UI will be able to visually represent the collection using up to 4 thumbnails of its contents, similar to how collections are represented visually in the Elvis desktop client.

{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 15,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "ATT8CDno4QCB59QHmjwnfS",
    "metadata" : {
     "folderPath" : "/Demo Zone/Images/People",
      "description" : "Bla ",
      "assetModifier" : "guest",
      "name" : "People",
      "assetPath" : "/Demo Zone/Images/People/People.collection",
      "assetCreator" : "admin",
      "extension" : "collection",
      "status" : "Correction",
      "filename" : "People.collection",
    },
    "thumbnailHits" : [ {
      "permissions" : "VPUM-----",
      "id" : "Cbg9-_ukKEZARORmuaCsn3",
      "metadata" : {
        "widthPt" : 872.0,
        "folderPath" : "/Demo Zone/Images/People",
        "bitsPerSample" : "8",
        "mimeType" : "image/jpeg",
        "copyright" : "Unknown, contact Stock.XCHNG for more information",
        "fileCreated" : {
          "value" : 1332929051000,
          "formatted" : "2012-03-28 12:04:11 +0200"
        },
    "originalUrl" : "http://demo.elvisdam.com/file/Cbg9-_ukKEZARORmuaCsn3/*/Kiting.jpg?_=4",
      "previewUrl" : "http://demo.elvisdam.com/preview/Cbg9-_ukKEZARORmuaCsn3/previews/maxWidth_1600_maxHeight_1600.jpg/*/Kiting_preview.jpg?_=1",
      "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/Cbg9-_ukKEZARORmuaCsn3/*/Kiting_thumb.jpg?_=1"
    }, {
     "permissions" : "VPUM-----",
      "id" : "E3bQMfYBaRSBauQotGIHRm",
      "metadata" : {
        "exposureTime" : 0.0015625,
        "widthPt" : 1600.0,
        "folderPath" : "/Demo Zone/Images/People",
        "yCbCrPositioning" : 2,
        "created" : {
          "value" : 1155147971000,
          "formatted" : "2006-08-09 20:26:11 +0200"
        },
     "originalUrl" : "http://demo.elvisdam.com/file/E3bQMfYBaRSBauQotGIHRm/*/Wave.jpg?_=4",
      "previewUrl" : "http://demo.elvisdam.com/preview/E3bQMfYBaRSBauQotGIHRm/previews/maxWidth_1600_maxHeight_1600.jpg/*/Wave_preview.jpg?_=1",
      "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/E3bQMfYBaRSBauQotGIHRm/*/Wave_thumb.jpg?_=1"
    }, {
      "permissions" : "VPUMECD",
      "id" : "3TZEqN_jae9BfjXejarHNU",
      "metadata" : {
        "extension" : "jpg",
        "assetPath" : "/Demo Zone/Images/Beaches/Wilsons Promontory National Park 2.jpg",
        "assetType" : "jpg",
        "assetRevision" : 1,
        "name" : "Wilsons Promontory National Park 2.jpg",
        "filename" : "Wilsons Promontory National Park 2.jpg",
        "assetDomain" : "image",
        "thumbnailState" : "yes",
        "previewState" : "yes"
      },
      "thumbnailUrl" : "http://localhost:8080/controller/thumbnail/Demo%20Zone/Images/Beaches/Wilsons%20Promontory%20National%20Park%202.jpg",
      "previewUrl" : "http://localhost:8080/controller/preview/Demo%20Zone/Images/Beaches/Wilsons%20Promontory%20National%20Park%202.jpg/previews/maxWidth_1600_maxHeight_1600.jpg",
      "originalUrl" : "http://localhost:8080/controller/file/Demo%20Zone/Images/Beaches/Wilsons%20Promontory%20National%20Park%202.jpg",
      "originalUncPath" : "\\\\yourserver\\ElvisFilestore\\Demo Zone\\Images\\Beaches\\Wilsons Promontory National Park 2.jpg"
    }, {
     "permissions" : "VPUM-----",
      "id" : "4hxoQEPDae1Bqz1N4pcmkk",
      "metadata" : {
        "exposureTime" : 0.0010,
        "widthPt" : 1600.0,
        "folderPath" : "/Demo Zone/Images/People",
        "usageRights" : "",
        "yCbCrPositioning" : 2,
        "created" : {
          "value" : 1190546721000,
          "formatted" : "2007-09-23 13:25:21 +0200"
        },
  "originalUrl" : "http://demo.elvisdam.com/file/4hxoQEPDae1Bqz1N4pcmkk/*/Jump.jpg?_=5",
      "previewUrl" : "http://demo.elvisdam.com/preview/4hxoQEPDae1Bqz1N4pcmkk/previews/maxWidth_1600_maxHeight_1600.jpg/*/Jump_preview.jpg?_=1",
      "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/4hxoQEPDae1Bqz1N4pcmkk/*/Jump_thumb.jpg?_=1" ],
    "originalUrl" : "http://localhost:8080/controller/file/Demo%20Zone/Images/Beaches/Beaches.collection",
    "originalUncPath" : "\\\\yourserver\\ElvisFilestore\\Demo Zone\\Images\\Beaches\\Beaches.collection"
  },
  {
    ...
  } ]
}

Relation search

When you perform a relation query, the results include information about the relation between each hit and the asset for which related items were searched.

search
http://demo.elvisdam.com/services/search
    ?q=relatedTo:3gzrBlE7KFY8WAbwzQ6YbZ
    relationTarget:child
    relationType:contains
{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 2,
  "hits" : [ {
    "permissions" : "VPUM-----",
    "id" : "EIGThLHQKNC9_DK0T_nnpd",
    "metadata" : {
     "assetPath" : "/Demo Zone/Archive/Elvis Daily/303/News/p001-Issue_303.pdf",
      ...
    },
  "relation" : {
      "relationType" : "contains",
      "target1Id" : "EIGThLHQKNC9_DK0T_nnpd",
      "target2Id" : "0DeNyXKhqjx81M2zeFYzuu",
      "relationId" : "8y_yPWrvqCG8uTdHL3QUUB",
      "relationMetadata" : {
        "relationModifier" : "importmodule",
        "relationCreator" : "importmodule",
        "relationCreated" : {
          "value" : 1333118349000,
          "formatted" : "2012-03-30 16:39:09 +0200"
        },
        "relationModified" : {
          "value" : 1333118349000,
          "formatted" : "2012-03-30 16:39:09 +0200"
        }
      }
    },
    "highlightedText" : "European rescue package\nNo alcohol allowed at \nCarnival in Venezuala\nRecords show \nthat one-third\nGreece is a developed country, \nwith a high standard of living and \n“very high” Human Development \nIndex, ranking 22nd in the world \nin 2010, and 22n...",
    "originalUrl" : "http://demo.elvisdam.com/file/EIGThLHQKNC9_DK0T_nnpd/*/p001-Issue_303.pdf?_=2",
    "previewUrl" : "http://demo.elvisdam.com/preview/EIGThLHQKNC9_DK0T_nnpd/previews/maxWidth_1600_maxHeight_1600_page_0.jpg/*/p001-Issue_303_preview.jpg?_=1",
    "thumbnailUrl" : "http://demo.elvisdam.com/thumbnail/EIGThLHQKNC9_DK0T_nnpd/*/p001-Issue_303_thumb.jpg?_=1"
  },
  ...
  ]
}

Facet search

When you specify facets in your search, the facet values will be returned next to the results.

search
http://demo.elvisdam.com/services/search
    ?q=green&facets=assetDomain
{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 2,
  "facets" : {
    "assetDomain" : [ {
     "value" : "document",
      "hitCount" : 1,
      "selected" : false
    }, {
      "value" : "image",
      "hitCount" : 1,
      "selected" : false
    } ]
  },
  "hits" : ...
}

Selected values for facets can be specified using facet.<field>.selection=<comma-delimited values>.

search
http://demo.elvisdam.com/services/search
    ?q=green&facets=assetDomain&facet.assetDomain.selection=image
{
  "firstResult" : 0,
  "maxResultHits" : 50,
  "totalHits" : 1,
  "facets" : {
    "assetDomain" : [ {
   "value" : "document",
      "hitCount" : 1,
      "selected" : false
    }, {
      "value" : "image",
      "hitCount" : 1,
      "selected" : true
    } ]
  },
  "hits" : ...
}

Document history

  • 22 November 2016: Added note to Start parameter about restriction in returned results.
  • 6 October 2016: Added returnHighlightedText.
Was this article helpful?
1 out of 1 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.