Funnelback logo

Documentation

Meta collection

Introduction

A meta collection is a collection that allows users to search over one or more existing collections at the same time. For example, if you had two web collections, one for the external Internet site and a second for the internal Intranet, you could create a meta collection comprising the two collections to allow internal users to search both sites.

Meta-collections operate similar to standard collections, except that they are not updated: the individual collections must be updated instead.

Creation

Creating a meta-collection is usually just a matter of selecting the collections you wish to be included. For example, on the "Edit Collection Settings" page shown below a web and TRIM collection have been included in a meta collection:

Fb-create-meta.png

Note that if any of the selected base collections have early binding document level security, the following option must be added to the collection.cfg file for meta collection to maintain security processing for those base collections:

security.earlybinding.user-to-key-mapper=Meta

Displaying Results in a Meta Collection

If your meta-collection comprises a number of different collection types, for example a web plus a database collection, then the search results will be a heterogeneous mix of records. The meta-collection'ssearch forms should use the resifcollection tag (Classic UI) or an <#if /> FreeMarker clause (Modern UI) to identify the child collection and format the record appropriately.

For example, if you had a database collection called "library" you could format results differently with the following:

Modern UI

<#if r.collection == "library">
  <a href="${r.cacheUrl}">${r.title}</a>
  <b>Library Record</b> - ${r.date?date?string.short}
  <#if r.metaData["y"]?exists>
    <span class="summary_label">ISBN:</span><${r.metaData["y"]}<br />
  </#if>
</#if>
<#if r.collection != "library">
  <a href="${r.cacheUrl}">${r.title}</a>
  <b>Other Record</b> - ${r.date?date?string.short}
  <#if r.metaData["a"]?exists>
    <span class="summary_label">Author:</span><${r.metaData["a"]}<br />
  </#if>
</#if>

Classic UI

<!-- Library records -->
<s:ResIfCollection name="library">
 <a href="<s:Res>cache_url</s:Res>"><s:Res>title</s:Res></a> 
 <b>Library Record</b> - <s:Res>date</s:Res>
 <s:ResIf name="md_y">
   <span class="summary_label">ISBN:</span> 
   <s:Res>md_y</s:Res> <br>
 </s:ResIf>
 ...
</s:ResIfCollection>
<!-- Everything else -->
<s:ResIfNotCollection name="library">
 <a href="<s:Res>cache_url</s:Res>"><s:Res>title</s:Res></a> 
 <b>Other Record</b> - <s:Res>date</s:Res>
 <s:ResIf name="md_a">
   <div class="summary">
   <span class="summary_label">Author:</span>
   <s:Res>md_a</s:Res></div>
 </s:ResIf>
 ...
</s:ResIfNotCollection name="library">

Note that cache_url is used for the links to the library records as they are the rows extracted from the database (as XML files).

You might also use a result transform to transform the results so that results from a specific sub-collection are processed in a particular way.

See also

top ⇑