Brief Search
General Purpose
The search/brief request performs a search request.
Input Parameters Description
The first four parameters in the list below are only relevant for restricted scopes. A restricted scope is authorized according to the following parameters: institution, group, and onCampus. Because the institution parameter defines which PC key is sent to Primo Central, it is most important when searching in Primo Central.
Input Parameters
Notes
Retrieving only full text results:
query=facet_tlevel,exact,online_resources_PC_TN.
From Primo V4.4 this also works in a blended search (up to then it worked only against a Primo Central search).
Retrieving only peer reviewed results from Primo Central:
query=facet_tlevel,exact,peer_reviewed
Working with facet_creationdate
Example: query=facet_creationdate,exact,[2005+TO+2013]
To query for an exact year, use the same value twice,
query=facet_creationdate,exact,[2013+TO+2013]
this will select records with creation date of 2013
Limitation on number of results
When querying Primo Central via API, you are limited to requesting records within the first 2,000 results. That is, if you are retrieving records in order to display 10 records per page, you can only display the first 200 pages.
Any request that you send to retrieve records beyond the first 2,000 records will result in an empty result set.
Record IDs retrieved from Primo Central
Record IDs returning from Primo Central will hold a leading “TN_” infront of them.
For example: TN_jstor1234.
In order to query against such record IDs, you must remove the leading TN_, so in our case: rid,exact,jstor1234
Output Parameters
Element | Description | Value |
---|---|---|
segments | Root element of the XML tree. | no value |
jagroot | Element to contain one or several sub-elements. Structure: Sub-element of segments. | no value |
result | Element to contain one or several sub-elements. Structure: Sub-element of jagroot. | no value |
querytransformations | Element to contain one or several sub-elements. Structure: Sub-element of result. | no value |
querytransformation | Element to contain one or several sub-elements. Structure: Sub-element of querytransformations. | no value |
action | did_u_mean. Structure: Sub-element of querytransformation. | any value |
query | Alternative spelling of the search term. Structure: Sub-element of querytransformation. | any value |
facetlist | Element to contain one or several sub-elements. Structure: Sub-element of result. | no value |
accurate_counters | Defines if the facets counters are accurate or approximate. Structure: Sub-element of facetlist. | “true” or “false” Default: true |
facet | Element to contain one or several sub-elements. Structure: Sub-element of facetlist. | no value |
name | Name of the facet. Structure: Sub-element of facet. | any value |
count | Number of facet values within one facet. Structure: Sub-element of facet. | any number |
facet_values | Element to contain one or several sub-elements. Structure: Sub-element of facet. | no value |
key | Name of the facet value. Structure: Sub-element of facet_values. | any value |
value | Number of records within one facet value. Structure: Sub-element of facet_values. | any value |
docset | Element to contain one or several sub-elements. Structure: Sub-element of result. | no value |
firsthit | Index of the first record to be returned by the search. Structure: Sub-element of docset. | any value |
lasthit | Index of the last record to be returned by the search. Structure: Sub-element of docset. | any value |
hit_time | Time used by the search engine to find results. Structure: Sub-element of docset. | any number |
total_time | Time used by the search engine to retrieveresults. Structure: Sub-element of docset. | any number |
totalhits | Number of results found by search. Structure: Sub-element of docset. | any number |
doc | Element to contain one or several sub-elements. Structure: Sub-element ofdocset. | no value |
no | Serial; number of the recordinthebulk. Structure: Sub-element of doc. | any value |
rank | The score of the query for the document. Structure: Sub-element of doc. | any decimalnumber |
id | IndexID of the recordin thesearchengine. Structure: Sub-element of doc. | any number |
local | Indicateswhethersearch was donelocally or remotely. Structure: Sub-element of doc. | “true” or “false” Default: true |
GETIT | Element to contain one or several sub-elements. Structure: Sub-element of doc. | novalue |
GetIt1 | Primary GetItlink. Structure: Sub-element of GETIT. | any value |
GetIt2 | Secondary GetIt link. Structure: Sub-element of GETIT. | any value |
pnx:PrimoNMBib | Element to contain one or several sub-elements. Structure: Sub-element of doc. | no value |
record | Details about how the internal structure of a PNX can be found in the Primo Technical Guide. |
Input Example
http://primo.com:170X/PrimoWebServices/xservice/search/brief?institution=WESTERN&onCampus=false&query=any,exact,lok&indx=1&bulkSize=2&dym=true&highlight=true&lang=eng
Output Example
<sear:SEGMENTS xmlns=" http://www.exlibrisgroup.com/xsd/jaguar/search" > <sear:JAGROOT> <sear:RESULT> <sear:DOCSET TOTALHITS="1"> <sear:DOC LOCAL="true" xmlns="http://www.exlibrisgroup.com/xsd/primo/primo_nm_bib" xmlns:sear="http://www.exlibrisgroup.com/xsd/jaguar/search" > <PrimoNMBib> <record> <control> <sourcerecordid>81686</sourcerecordid> <sourceid>White_Shore_Voyager</sourceid> ... </control> <display> <type>book</type> <title>Harry Potter and the deathly hallows</title> <creator>J. K. Rowling</creator> ... </display> <links> <openurl>$$Topenurl_journal</openurl> <backlink>$$Tvoyager_backlink$$Ebacklink</backlink> ... </links> <search> <title>Harry Potter and the deathly hallows /</title> <subject>Potter, Harry (Fictitious character) Fiction.</subject> ... </search> <sort> <title>Harry Potter and the deathly hallows /</title> <creationdate>2007</creationdate> ... </sort> <facets> <language>eng</language> <creationdate>2007</creationdate> ... </facets> <dedup> <f7>harry potter and the deathly hallows</f7> <f8>nyu</f8> ... </dedup> <frbr> <t>1</t> <k1>$$Krowling j k$$AA</k1> </frbr> <delivery> <institution>WHITESHORE</institution> <delcategory>Online Resource</delcategory> </delivery> <ranking> <booster1>1</booster1> <booster2>1</booster2> </ranking> <addata> <aulast>Rowling</aulast> <aufirst>J. K.</aufirst> ... </addata> </record> </PrimoNMBib> <sear:GETIT GetIt2="http://1.1.1.1?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2011-06-10T17%3A28%3A55IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Journal-White_Shore_Voyager&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=book&...../> <sear:GETIT GetIt2="" GetIt1="OVP" deliveryCategory="Physical Item"/> <sear:LIBRARIES> <sear:LIBRARY> <sear:library>MAIN</sear:library> ... </sear:LIBRARY> </sear:LIBRARIES> <sear:LINKS> <sear:openurl><![CDATA[></sear:openurl> ... </sear:LINKS> </sear:DOC> </sear:DOCSET> </sear:RESULT> </sear:JAGROOT> </SEGMENTS>