Brief Search

General Purpose

Create direct links into your Primo site.
Be able to create a link leading to the brief result page of your Primo site.

Base URL

The base URL to be used is: http://<primo domain>/primo_library/libweb/action/dlSearch.do

To this URL you must supply additional parameters.

Input Parameters

NameExplanationMandatory
queryThe query parameter is a combination of three attributes that are separated by a comma:
&query=<field>,<precision>,<value>1) field – The field to search against
2) precision – A precision operator (i.e exact/contains/begins_with)
3) value – Any value
Examples:&query=facet_topic,exact,Nonfiction
&query=any,contains,queens+of+the+stone+age (the value contains more than one term in it)
&query=any,contains,queens&query=dr_s,exact,20100101&query=dr_e,exact,20101231 (see description for the dr_s and dr_e attributes below)Note: The query parameter can be used more than once in the URL thus causing for an AND correlation between the two values:For example:
&query=creator,contains,comm&query=facet_creator,exact,United+States1) <field> possible values:
The field names to be used are field names used by the search engine. As such their names are a bit different than what you would expect. The below will list the relevant field names:
a) any –
Will search against most of the fields at once.
Example: &query=any,contains,queens
b) regular fields –
(taken from the code table: “Basic Index Fields”):
desc, title, creator, sub (subject), rtype (resource type), isbn, issn,
rectype (record type), dlink (down link), ftext (full text), general, toc, fmt,
lang, cdate (creation date), sid (source ID), rid (record ID),
addsrcrid (additional source ID), addtitle, pnxtype, alttitle,
abstract, and fiction
Example: &query=rid,exact,PRIMO1234
b) facet fields –
(taken from the code table: “Facets Code Fields”):
facet_creator, facet_lang, facet_rtype, facet_pfilter, facet_topic,
facet_creationdate, facet_dcc, facet_lcc, facet_rvk,
facet_tlevel,facet_domain, facet_fsize, facet_fmt, facet_frbrgroupid,
facet_frbrtype, facet_local1 – facet_local50
Example: &query=facet_creator,william+s+burroughs2) <precision>possible values:NOTE: for facets, the only possible precision value is exact (i.e. &query=facet_topic,exact,Nonfiction)a) exact – When searching for a phrase (more than one term,
i.e “queens of the stone age”) and we want an exact match
for this phrase.
                 Note: When querying for one term there is no difference
between exact and contains
Example: &query=title,exact,queens+of+the+stone+age
b) contains -When searching for one term, will return results for any field
containing this term. When searching for a phrase, will return
results for any field containing at least one of the given terms.
For example:
                      &query=title,contains,queens+of+the+stone+agewill return titles like:
“the age of life”, “kings and queens” or
age and health of queens“c) begins_with – Works only against the sort title field (swstitle)!
The swstitle was not mentioned above. The swstitle is the
title under the sort section in the PNX.
Note: 1) When using this precision, there is no meaning to
                                            the field you are using, as it will always search
                                            against the swstitle field!
2) Usually you will want to use sortField=stitle, when searching with begins_with (and not the default relevance)3) <value> possible values:
Any value is allowed.
Values including commas in them should replace the comma with a space.
Yes
viddefines the View to accessYes
institutiondefines the institution to be usedYes
search_scopeShould include the search scope code as defined in the View Wizard on the Search Scopes page.

Note: In the View Wizard, the code is defined in the Name field.

A search scope can include multiple local scope values and/or MetaLib quick-sets and/or Primo Central.

The Front End will decode the search scope in the same way that it does it for a search entered in the Primo Front End. Only one ‘search_scope’ parameter is allowed per request. For example:

http://host:port/primo_library/libweb/action/dlSearch.do?institution=PRIMO&query=any,contains,test&vid=Auto1&search_scope=blend

The deep-link will display the tab which is associated with the search scope. If the same search scope is used by several tabs and the ‘tab’ parameter is not included in the deep link, the system will display the first tab that includes the search scope. If a deep link specifies a search scope that is not defined for any tab, the system will display the first tab and the first search scope defined for the tab.

In earlier version the “loc” parameter was used, but in newer versions, we recommend using the search_scope instead.]

Yes
groupName of the user group. Relevant for restricted scopes.No
prefLangDefine the UI language, the purpose is to display the Primo front end in the requested interface language parameter Need to be set with the requested local for example: prefLang = en_USNo
locNOTE: This parameter is deprecated, use search_scope instead

Supports 3 different search targets:

1) Local
2) Deep Search
3) Remote (Metalib) – If the results from a remote site are not in the MetaLib data format, Primo displays a link to the results in the Additional Results section, which appears first in the results.

In order to add a target to search on, add the following template to the URL:
loc=<target>,<location reference>

<target> possible values:

1) local – For a local search
2) adaptor – For a deep search
3) remote – For a remote search against Metalib

<location reference> possible values:

1) for local – define the scope to search on
Example: loc=local,scope:(VOLCANO)
2) for adaptor – need to define the name of the requested adaptor
Example: loc=adaptor,primo_central_multiple_fe
3) for remote – need to define a quick set name
Example: loc=remote,Business and Sciences

A single request will let you define as many search targets as you want, meaning, all 3 can be done in a single request.

Example for single search target:

http ://il-primo03:1702/PrimoWebServices/xservice/search/brief?institution=PRIMO&query=any,contains,book&indx=20&bulkSize=10&loc=local,scope:(VOLCANO)
Example for multi search (two)  targets:

http ://il-primo03:1702/PrimoWebServices/xservice/search/brief?institution=PRIMO&query=any,contains,book&indx=20&bulkSize=10&loc=local,scope:(VOLCANO)&loc=adaptor,primo_central_multiple_fe

Example for multi search (three)  targets:

http ://il-primo03:1702/PrimoWebServices/xservice/search/brief?institution=PRIMO&query=any,contains,book&indx=20&bulkSize=10&loc=local,scope:(VOLCANO)&loc=adaptor,primo_central_multiple_fe&loc=remote,Business and Sciences

Multiple scopes
You can search multiple scopes in 2 ways:
1) loc=local,scope:(VOLCANO,NORTH)
2) Use multiple loc parameters:
&loc=local,scope:(VOLCANO)&loc=local,scope:(NORTH)
There is a limitation to the order and which scopes can be used in such queries.
The limitation is according to the “Search Scopes” you have defined for each view.
To be sure what your “Search scopes” are, you can view the following file on your FE machine:
$primo_dev/ng/jaguar/home/system/conf/search_schema.xml

under the <filters> tag you will find all your configured search scopes:
<filters>
<filter>facet_frbrtype:(7 OR 6)</filter>
<filter>NOT scope:(“PRIMO”)</filter>
<filter>scope:(NORTH)  OR scope:(demo_digitool) OR scope:(“CENTRAL”)</filter>
<filter>scope:(BBR)</filter>
You are allowed to use only those scopes listed in the file and only use the order as in the file.
Mixing the order will not work, so &loc=local,scope:(NORTH, demo_digitool, “CENTRAL”) will work but &loc=local,scope:( demo_digitool, NORTH,”CENTRAL”) will not!
Searching against Primo Central
Searching against Primo Central is done via an adaptor.
Therefor as mentioned above, you will need to add the following:
loc=adaptor,primo_central_multiple_fe

No
tabDisplay the relevant tab.

&tab=mixed

According to the tab code configured in the view wizard

 

NOTE: the value sent, must be in lower case, even if the code contains upper case letters.

indxThe position number of the record to begin from when retrieving the results
(For example, in order to display page #2, we want to set indx=11, meaning start retrieving records from position 11 in the result set)
No
bulkSizeThe amount of records to retrieve from the position set for indx (In order to display page #2 when we display 10 records in a page:
indx=11
bulkSize=10)
No
srtSee the XServices for complete documentation.

Specifies the type of sort to perform. If this parameter is not specified or left empty, the system uses the relevance sort. In addition to the relevance sort, Primo supports the following types of sorts:

  • stitle – performs a title sort.
  • scdate – performs a date sort in descending order.
  • scdate2 – performs a date sort in ascending order.
  • screator – performs an author sort.
  • popularity – performs a popularity sort.

The valid values for this parameter are defined with the Index Field column in the Sort Fields Config mapping table. The direction of the sort is defined with the Direction column.

No
query (dr_s
and  dr_e)
The date range query allows you to filter your search with a data range, which is similar to the functionality provided by the date widget in the advanced search:


Use the following format to specify either a start and end range, a start date only, or an end date only:

&query=dr_s,exact,YYYYMMDD&query=dr_e,exact,YYYYMMDD

For example:
&query=dr_s,exact,19840201&query=dr_e,exact,99991231

NOTE: You must also specify a search query. For more information, see the query parameter above.

No
highlight + displayFieldYou can define to “highlight” the search term you have requested in the retrieved results.
(Below, highlighting the title when searching for the term: “book”)

highlight
Indication whether highlights by server is required.
Possible values: true or false
Default: false

If highlight=true, you must specify one or more displayField parameters to indicate which fields to highlight.

displayField
defines in which field from the Display section of the PNX to highlight, if it contains the search term.
Possible values: PNX field names from the Display section.
You can define more than 1 displayField:
&highlight=true&displayField=title&displayField=creator

NOTE: the highlighting is done by wrapping the relevant section in the PNX with a <span> tag,
i.e. <span class=”searchword”>BOOK</span>

No
pcAvailabiltyModeIndicates whether PC records that do not contain full text are displayed in the search results. By default, Primo displays only records that contain full text. If you set this parameter to true all PC records will display. The valid values are true and false (default).

NOTE: If the Include Results with no full-text option is selected in the Views Wizard (Primo Home > Ongoing Configuration Wizards > Views Wizard), the Expand My Results option will be disabled in the Front End. Users will have to select the Full Text Online facet to display PC records that have full text only.

No
azSearchOpens the Journals A-Z interface. The valid values are true and false (default).

For Alma-Primo environments, include the following parameter: fn=almaAzSearch.

For example:
http://my.primo.hosted.exlibrisgroup.com/primo_library/libweb/action/dlSearch.do?vid=01ABCSRCH&institution=01ABCSRCH&azSearch=true&fn=almaAzSearch

true

Notes

In order to query the date facet using between values:

query=facet_creationdate,exact,[2005+TO+2013]

Input Example

http://primo:170X/primo_library/libweb/action/dlSearch.do?vid=Auto1&institution=VOLCANO&onCampus=false&search_scope=MYSCOPE&query=any,contains,bible&indx=1&bulkSize=10

Output Example