Platform API‎ > ‎

Store Facet Service

URI Pattern

http://api.talis.com/stores/{storename}/services/facet


Resource Operations

URI PatternMethodRequest BodySemanticsCapability required
/services/facetGETRetrieve an HTML formbasic search
/services/facet?query=&fields=GETPerform a Facetted Browsebasic search


Request Parameters

ParameterRequired?DescriptionValues
queryYesThe query expression for which the top ranking terms should be calculatedText Search Syntax
fieldYesA comma delimited list of fields for which top ranking terms are to be returnedAny valid field (see Field Predicate Map
topNoThe maximum number of terms to return for each fieldAn Integer. Default is 5
outputNoSelects the Output Type
  • xml
  • html


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.

Comments