[Advanced users] Process federated search feeds


About

If you're a developer connecting your organization's search engine to a Kaltura video site, this article explains how to read the federated search feeds and keep your index up to date.

Your site administrator sets up the feeds in the Federatedsearchindexing module and gives you what you need to access them.

Before you start

Get the following from your site administrator:

  • The seed feed URL and the sync feed URL
  • The app token ID and value
  • How often to check the sync feed
  • If the site uses custom metadata, the list of custom fields and their system names

Access the feeds

  1. Create a Kaltura Session (KS) with the app token. For instructions and sample code, see App Token Authentication.
  2. Add &ks= and the KS to the end of the feed URL, for example: https://www.kaltura.com/api_v3/getFeed.php?partnerId=12345&feedId=1_abc123&ks={ks}

Without a KS, the feed returns no items.

How to use the feeds

Both feeds are in an enriched MRSS format, and include only published content.

  1. Load the seed feed to index all of the site's existing content.
  2. Check the sync feed regularly to add, update, and remove content. Check it at least as often as your site administrator tells you, or you miss changes.
  3. Reload the seed feed now and then, for example once a quarter, to remove content that was unpublished. The sync feed can't show unpublished content.

Seed feed: paging

The seed feed is split into pages. At the end of each page, look for a <link rel="next" href="..."> element, and load the URL in its href attribute to get the next page. Continue until a page no longer has this element.

Sync feed: changes and deletions

The sync feed lists the entries that changed since your last check, including deleted entries. For each item:

  • If status is 3, the entry was deleted. Remove it from your index. Deleted items contain only entryId and status.
  • Otherwise, check whether the entry is already in your index. If it is, update it. If it isn't, add it as a new entry.

Feed fields

Both feeds include the following fields. If your search engine needs a different structure, ask your site administrator for the feeds' XSLT file, change it, and give it back to them to upload.

Field Description
entryId The entry's unique ID. Use it to play the entry in a Kaltura player.
createdAt When the entry was created, as a Unix timestamp.
updatedAt When the entry was last updated, as a Unix timestamp.
mediaType 1 = video, 2 = image, 5 = audio.
entryType 1 = media hosted in Kaltura, externalMedia.externalMedia = YouTube video.
duration The length of the media, in milliseconds. Tip: Show the length in your search results, so users know how long the video is before they click it.
name The entry's name. Use it as the title.
status 2 = ready (can be indexed), 3 = deleted (sync feed only).
description The entry's description.
thumbnailUrl The URL of the entry's thumbnail. Index it as is, so you always get the latest thumbnail. To set the size when you show it, add /width/{value}/height/{value}/type/3 to the URL, for example, /width/478/height/269/type/3. /type/3 crops the image from the center. For all thumbnail options, see The Kaltura Thumbnail API.
tags Tags that the entry's owner added. You can use them to build tag search links to the site, and to recommend related content.
customData Custom metadata, if the site uses a custom metadata schema. Ask your site administrator for the list of fields and their system names.
scene-annotation Comments on the entry. Index them with the entry, so users can find it more easily.
scene-thumb-cue-point Slides (type=1) or chapters (type=2) in the entry. Index them with the entry, so users can find it more easily.
Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In this article
Related articles