Faceted Search Portal: Query Guide

Parameter Value [1] [8] Description
keywords
/.+/

A whitespace delimited set of free-text keywords which MAY occur in the indexed textual content of a target resource. [2]

facets
/.+/

A whitespace delimited set of RDF query facets [3] which MAY match metadata defined for a target resource. [2]

mandatory-keywords
/.+/

A whitespace delimited set of free-text keywords which MUST occur in the indexed textual content of a target resource. [2]

mandatory-facets
/.+/

A whitespace delimited set of RDF query facets [3] which MUST match metadata defined for a target resource. [2]

match all

All facets/keywords defined in the query must match.

[default]

any

Zero or more facets/keywords defined in the query must match. [4]

one

One or more facets/keywords defined in the query must match. [4]

ignore-case false

Strings are compared literally.

[default]

true

Strings are compared without regard to case (i.e. "A" = "a").

sortby date

Results are ordered by date, with the newest resources listed first. [5]

[default]

title

Results are ordered alphanumerically by title or label. [5]

best

Results are ordered by best match, with the resources matching the greatest number of facets/keywords listed first.

format rss

Return resource descriptions serialized as RSS 1.0 (RDF).

[default]

list

Return a list of URIs denoting the matched target resources.

facets

Return resource descriptions serialized as RDF Facets where each identified resource is defined by a set of index facets, one per line, preceeded by the URI denoting the resource, with each set of facets delimited by a blank line.

detail basic

When result format is other than 'list', return descriptions consisting solely of dc:title, dc:description, dc:date, dc:format, and dc:language for each matched resource. [5]

[default]

full

When result format is other than 'list', return descriptions consisting of all known metadata for each matched resource.

limit
/[1-9][0-9]*/

A positive integer specifying the maximum number of targets to return, after sorting (if applicable).

index
/[1-9][0-9]*/

A positive integer specifying the starting index of a subsequence of query results to return. If equal to 1, then the parameter has no affect on the results. If greater than 1, then a subset of the ordered results are returned, beginning from the specified index and up to the 'limit' number of targets (if specified), else the remainder of the search results. [6]



Notes:

[1]

All parameter values must be URL encoded as appropriate.

[2]

Either or both of the parameters 'facets' or 'keywords' must be specified for every query.

[3]

Some implementations of this interface may only support simply equality tests of basic RDF index facets; in which case, inclusion of query facets with property value comparison operators will result in an error.

[4]

If 'any' or 'one' is specified, and unless otherwise indicated, results are sorted according to 'best' match, with the resources matching the greatest number of facets/keywords listed first.

[5]

The title value is taken to be the first discernable value (possibly taking into account rdfs:subPropertyOf and owl:sameAs relations) for rss:title, dc:title, or rdfs:label. [7] If no such value can be determined, the URI denoting the resource is used as its title.

The description value is taken to be the first discernable value (possibly taking into account rdfs:subPropertyOf and owl:sameAs relations) for rss:description, dc:description, or rdfs:comment [7]. If no such value can be determined, no description is specified in the results.

The date value is taken to be the first discernable value (possibly taking into account rdfs:subPropertyOf and owl:sameAs relations) for dc:date [7] which corresponds to a valid ISO formatted date or datetime. If no such value can be determined, no date is specified in the results.

The format value is taken to be the first discernable value (possibly taking into account rdfs:subPropertyOf and owl:sameAs relations) for dc:format [7] which corresponds to a valid MIME content type designator. If no such value can be determined, no format is specified in the results.

The language value is taken to be the first discernable value (possibly taking into account rdfs:subPropertyOf and owl:sameAs relations) for dc:language [7] which corresponds to a valid ISO language code. If no such value can be determined, no language is specified in the results.

[6]

Implementations may respond to index requests based on cached copies of previous, otherwise equivalent, query results in order to increase efficiency; or alternately implementations may simply re-execute the entire query for each requested indexed subset of the results. This API does not mandate either approach, and provides a consistent interface to either solution.

[7]

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rss="http://purl.org/rss/1.0/"

[8]

This query interface supports a very limited, simple level of boolean logic, depending on the combination of parameters specified, which allow one to first select a set of targets based on one or more mandatory keywords and/or facets, and then rank those particular targets by how closely they match any additionally specified keywords and/or facets.

match keywords facets mandatory-
keywords
mandatory-
facets
Equivalent Boolean Query:
any a b     [ a OR b ]
one a b     a OR b
all a b     a AND b
any     c d c AND d {i}
one     c d c AND d
all     c d c AND d
any a b c d [ (a OR b) AND ] (c AND d)
one a b c d (a OR b) AND (c AND d) {ii}
all a b c d a AND b AND c AND d

{i} Note that the value of the match parameter has no affect on the interpretation of "mandatory-*" parameters. All mandatory keywords/facets are always required to match.

{ii} Note that in this case, at least one of the non-mandatory keywords or facets must match in order for the query to match, thus a resource that matches all mandatory criteria but fails to match any non-mandatory criteria would not match.