search
Overview
The search service returns items and facet values for a search query in the NCSU Libraries catalog.
GET Request Parameters
| Parameter | Value | Description |
|---|---|---|
| service | "search" (required) | Name of this CatalogWS service. |
| query | URL-encoded string (required), null value returns full catalog |
Search term(s). |
| N | Positive integer (optional), null value returns full catalog |
Endeca facet node constraint. Multiple values can be combined using a plus delimiter. Ex: 205746+4293831954 |
| count | positive integer (optional), omit for default 30, max 300 |
Total number of items to be returned by request. |
| sort | Enumerated string (optional), omit for default "relevance" |
Sort order of results set. Accepted values: "relevance", "date_desc", "date_asc", "call_number", "most_popular", "date_added". |
| facet_sort.[facetid] | Enumerated string (optional) | Facet values sort override for a specified facet. Accepted [facetid] keys: "lc_class", "topic", "genre", "format", "library", "region", "era", "language", "era", "author", "availability", "new_titles" |
| offset | Positive integer (optional) | The offset, in individual search results, of the first search result |
| output | Enumerated string (optional), omit for default "xml" |
Defines the output format of the response. Accepted values: "xml", "json", "rss", "opensearch". |
| style | URL-encoded string (optional) | URL to an XSL stylesheet for transforming the service response to a custom output format using the XSL file specified. |
| live | Enumerated string (optional) | Enables realtime availability statements from the ILS, rather than the default hourly cache from the ILS. Setting this to "true" incurs a performance penalty of about 800 to 1200 ms per CatalogWS request. Accepted values: "true". |
Example Request
http://www.lib.ncsu.edu/catalogws/?service=search&query=deforestation
Implementation Notes
- You must specify a User-Agent in the HTTP headers of your CatalogWS request, otherwise the request will be denied. For example, if you are using the cURL functions in PHP to make requests, you can specify the User-Agent by adding this line to your code:
curl_setopt($ch, CURLOPT_USERAGENT, "My Application Name");
Example Responses
- Search results in native XML format
- Search results in RSS 2.0 format
- Search results in OpenSearch format
