URI Patternhttp://api.talis.com/stores/{storename}/services/facet
|
| URI Pattern | Method | Request Body | Semantics | Capability required |
|---|---|---|---|---|
| /services/facet | GET | Retrieve an HTML form | basic search | |
| /services/facet?query=&fields= | GET | Perform a Facetted Browse | basic search |
Request Parameters
| Parameter | Required? | Description | Values |
|---|---|---|---|
| query | Yes | The query expression for which the top ranking terms should be calculated | Text Search Syntax |
| field | Yes | A comma delimited list of fields for which top ranking terms are to be returned | Any valid field (see Field Predicate Map |
| top | No | The maximum number of terms to return for each field | An Integer. Default is 5 |
| output | No | Selects the Output Type |
|
Facetted Browsing
XML Output Format
The root element of the result is <facet-service>. This contains a <head> element which contains one child element for each of the service parameters containing the values supplied for this request.
The <fields> element contains one <field> child element per field that is analysed by the service. Fields that have no matching terms are included as empty elements. Fields specified in the request that do not exist in the bigfoot store are not included as child elements.
The search-uri attribute contains the URI the user can use to obtain the results for the given field value. The number attribute contains an indicative number of items that match the given query and field value - this is not guaranteed to be the same as the number of results obtained by querying the contentbox directly.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cs="http://purl.org/vocab/changeset/schema#" >
<rdf:Description rdf:about="http://api.talis.test/res/one/1">
<rdf:type rdf:resource="http://purl.org/vocab/changeset/schema#ChangeSet"/>
<cs:precedingChangeSet rdf:resource="http://api.talis.test/res/one/2" />
<cs:subjectOfChange rdf:resource="http://example.com/one"/>
<cs:creatorName>Talis</cs:creatorName>
<cs:changeReason>Change is inevitable</cs:changeReason>
<cs:removal rdf:resource="http://api.talis.test/res/one/1/removal/1"/>
<cs:addition rdf:resource="http://api.talis.test/res/one/1/addition/1"/>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.test/res/one/1/removal/1">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<rdf:subject rdf:resource="http://example.com/one"/>
<rdf:predicate rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
<rdf:object>Modified Label One</rdf:object>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.test/res/one/1/addition/1">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<rdf:subject rdf:resource="http://example.com/one"/>
<rdf:predicate rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
<rdf:object>Again Modified Label One</rdf:object>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.test/res/one/2">
<rdf:type rdf:resource="http://purl.org/vocab/changeset/schema#ChangeSet"/>
<cs:subjectOfChange rdf:resource="http://example.com/one"/>
<cs:creatorName>Talis</cs:creatorName>
<cs:changeReason>Change Happens</cs:changeReason>
<cs:removal rdf:resource="http://api.talis.test/res/one/2/removal/1"/>
<cs:addition rdf:resource="http://api.talis.test/res/one/2/addition/1"/>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.test/res/one/2/removal/1">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<rdf:subject rdf:resource="http://example.com/one"/>
<rdf:predicate rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
<rdf:object>Label One</rdf:object>
</rdf:Description>
<rdf:Description rdf:about="http://api.talis.test/res/one/2/addition/1">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<rdf:subject rdf:resource="http://example.com/one"/>
<rdf:predicate rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
<rdf:object>Modified Label One</rdf:object>
</rdf:Description>
</rdf:RDF>
HTML Output Format
The HTML output format option provides a simple way to visualize the results of the Facet service.
The results are delivered with a link to fetch matching items or browse within additional facets.

© Talis Systems Ltd. 2011 Content is available under