Funnelback logo

Documentation

Alternative Metadata Values

Introduction

Funnelback supports the storing of multiple alternative values within a single metadata string. When comparing or presenting values from a metadata string, a particular value can be selected by specifying a key, with fallback to a default value if the key is not present. Note: If a metadata field containing multiple alternative values is accessed without using the special options in the table below, the whole string will be used. To use the default value you must use the special options with a non-existent key, such as 'default'.

Example application in e-commerce: A large on-line retailer sells the same item for different prices, depending upon the location of the customer's nearest store. Using Funnelback's Selectable Metadata, only one document is needed for each item available for sale. In that document the price metadata is stored in the form of a string such as:

"4.10;5;(London;2.50)(Canberra;4.99)(Sydney;4.50)(Brisbane;4.63)(Szczecin;12.80)"

where 4.10 is the default price, 5 specifies that there are 5 exceptions, and the pairs of entries in parentheses show the prices which apply for the five different cities. When a person searches from a city, the city name can be inserted into the query string as a selector and the price shown and used in numerical range searches will be the one applicable to that city. For Melbourne, where no exception price is shown, the default price of 4.10 will be used.

Example application in a multi-lingual environment: An online collection for a Swiss museum contains images of artefacts along with applicable metadata. Some of the metadata is language independent (e.g. catalogue number) but other metadata such as the description of the artefact needs to exist in more than one language, for example:

"Steinaxt;3;(FR;hache de pierre);(EN;stone axe)(IT;ascia di pietra)"

Where the default description is in German but alternatives are available for French, English and Italian.

The selectable metadata mechanism can be controlled via CGI parameters:

CGI Parameter Values Description
selector_<x> where <x> is a metadata class <string> specifies the key to use when accessing metadata class <x>
slt_<x> where <x> is a metadata class <float> Performs a "Less than" operation on metadata class <x>, accessed by the key
sle_<x> where <x> is a metadata class <float> Performs a "Less than or equals" operation on metadata class <x>, accessed by the key
sgt_<x> where <x> is a metadata class <float> Performs a "Greater than" operation on metadata class <x>, accessed by the key
sge_<x> where <x> is a metadata class <float> Performs a "Greater than or equals" operation on metadata class <x>, accessed by the key
seq_<x> where <x> is a metadata class <float> Performs an "Equals" operation on metadata class <x>, accessed by the key

Metadata Format and Constraints

An administrator wishing to use the selectable metadata system will need to use workflow to ensure that metadata strings are in the correct format:

  • Keys may contain spaces and commas but not semicolons, double-quotes or parentheses.
  • Values may include semicolons, double-quotes and parentheses but only within double-quotes. To include a double-quote within a quoted part of a value, use double double-quotes. If a value is just double-quote, you will need to represent it using four consecutive double-quotes.
  • Semicolons are used to separate keys and values and also to terminated the default value and number of fields (currently ignored).
  • Values do not have to be numeric.
  • A maximum of ten fields may be made selectable.
  • Only one selector can be specified per field. In the e-commerce example, the price of Vegemite could be made to depend either on the size of the jar or on the store, but not both.

Example Search Strings

"&selector_P=mystore&sle_P=4.20"    # return items whose price in mystore is no greater than 4.20
"&SMmeta&SFCD&selector_C=FR&selector_D=fr   # display search results with French versions of the C and D metadata.

See Also

top ⇑