This is the Platform API documentation for the Query Profile configuration associated with a Store. Query Profiles provide the ability to further configure the Contentbox searching capability, allowing the assignment of weights to specific fields. Query Profiles work in conjunction with Field Predicate Maps. URI PatternNote: Currently the platform supports only a single Query Profile for each store. This is at the well-known location shown below. http://api.talis.com/stores/{storename}/config/queryprofiles/1 The Query Profile for older Stores may be in a different location. You may want to also try
|
| URI Pattern | Method | Request Body | Semantics | Capability required |
|---|---|---|---|---|
| /config/queryprofiles/1 | GET | retrieve the profile | configure store | |
| PUT | application/rdf+xml | update the profile | configure store |
Request Parameters
| Parameter | Required? | Description | Values |
|---|---|---|---|
| output | No | Specify the Output Type. For GET only. |
|
Retrieve The Query Profile
A GET request to the Query Profile URI will retrieve the current query profile configuration. Performing this operations requires the configure store capability.
The response is an RDF/XML document, e.g:
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://schemas.talis.com/2006/bigfoot/configuration#" xmlns:frm="http://schemas.talis.com/2006/frame/schema#"> <bf:QueryProfile rdf:about="http://api.talis.local/stores/storename/config/queryprofiles/1"> <rdfs:label>default query profile</rdfs:label> <bf:fieldWeight> <rdf:Description rdf:about="http://api.talis.com/stores/storename/congfig/queryprofiles/1#name"> <bf:weight>10.0</bf:weight> <frm:name>name</frm:name> </rdf:Description> </bf:fieldWeight> </bf:QueryProfile> </rdf:RDF>
For example:
curl -v -H accept:application/rdf+xml http://api.talis.com/stores/mystore/indexes/default/queryprofiles/default
For a description of this format and further information see the Query Profile documentation.
The retrieved RDF consists of the Hierarchical CBD for the requested resource.
Update The Query Profile
The Query Profile for a Store can be updated by performing a PUT request to the query profile URI, submitting a complete description of the mapping configuration. The document in the PUT request will be used to completely replace the current configuration with that specified.
Care should therefore be taken to ensure that a current copy of the configuration is retrieved, updated locally, and then submitted back to the server to apply the changes. Any mapping configuration that is not included in the data PUT back to the server will be deleted.
For example:
curl -v -T queryprofile.xml -H content-type:application/rdf+xml http://api.talis.com/stores/storename/config/queryprofiles/1

© Talis Systems Ltd. 2011 Content is available under