Using Search Types

HoldingsIQ supports seven different search types when using the GET /{custid}/titles endpoint. HoldingsIQ supports two search types when using the GET /{custid}/packages endpoint or the GET /{custid}/vendors/{vendorid}/packages endpoint. The search types supported by the GET /{custid}/titles endpoint are below:

  • Any
  • Contains
  • Exact Match
  • Proximity
  • Exact Phrase
  • Advanced

The GET /{custid}/packages and the GET /{custid}/vendors/{vendorid}/packages endpoints support the Exact Phrase and the Advanced search types. The endpoints support the search types using the optional searchtype query parameter. The searchtype parameter is applicable for all of the four search fields. For the GET /{custid}/titles endpoint, the searchtype parameter can be set to one of the following options: any, contains, exactmatch, beginswith, proximity, exactphrase or advanced. For the GET /{custid}/packages or the GET /{custid}/vendors/{vendorid}/packages endpoint, the searchtype parameter can be set to exactphrase or advanced. The searchtype parameter defaults to contains if you do not provide it. Please continue reading for more information on each search type.

To Specify a Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=teen&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=exactmatch

Any

The any search type is supported by the GET /{custid}/titles endpoint. It can be used with any of the search fields. The any search type performs a "MATCH" query equivalent of an OR between each search term. The OR operator combines search terms so that each search result contains at least one of the terms. For example, use searchtype=any and search=sleep waking to find results that reference the terms sleep or the term waking.

To Use the Any Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=sleep waking&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=any

Contains

The contains search type is supported by the GET /{custid}/titles endpoint. It can be used with any of the search fields. The contains search type performs a "MATCH" query equivalent of an AND between each search term. When you would like the search result to contain all of the search terms, the contains search type is needed. For example, use searchtype=contains and search=sleep walking to find results that refer to both sleep and walking.

To Use the Contains Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=sleep walking&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=contains

Exact Match

The exact match search type is supported by the GET /{custid}/titles endpoint. It can be used with any of the search fields. The exact match search type performs a "TERM" search to look for your exact search term in its entirety. If there is a match, then it retrieves the list of titles matching the whole term in its entirety. So, only when the result contains an exact match to the search term will a result be returned. For example, use searchtype=exactmatch and search=Natural Neuroscience to return the title that matches the whole title name Natural Neuroscience.

To Use the Exact Match Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=Natural Neuroscience&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=exactmatch

Begins With

The begins with search type is supported by the GET /{custid}/titles endpoint. It can be used with any of the search fields. Begins with searching returns results that begin with the search term. For example, use searchtype=beginswith and search=dog f to return results dog fight, dog food and dog freight.

To Use the Begins With Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=dog f&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=beginswith

Proximity

The proximity search type is supported by the GET /{custid}/titles endpoint. It can be used with any of the search fields. Proximity searching is a way to search for two or more search terms that occur within five words of one another in the order that the search terms are presented. "Near" search is not allowed. Proximity search only supports within 5 ordered words. For example, use searchtype=proximity and search=brown dog to return results this is a brown dog and this dog is really brown.

To Use Proximity Searching (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=brown dog&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=proximity

Exact Phrase

The exact phrase search type is supported by the GET /{custid}/titles, GET /{custid}/vendors/{vendorid}/packages, and GET /{custid}/packages endpoints. It can be used with any of the search fields. When you would like to search for terms in the exact order in which they appear, exact phrase searching is needed. For example, use the searchtype=exactphrase and search=Natural Neuroscience to find results such as Natural Neuroscience, Natural Neuroscience in climate change and Journal of Natural neuroscience.

To Use Exact Phrase Searching (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=Natural Neuroscience&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=exactphrase

Advanced

The full advanced search type is supported by the GET /{custid}/titles endpoint. The searches supported by the full advanced search type are below:

  • Phrase Support
  • Boolean Support (AND, OR, NOT)
  • Wild Character Support

The GET /{custid}/packages and GET /{custid}/vendors/{vendorid}/packages endpoints support only Boolean searches when using the advanced search type.

Set the search type to advanced to use phrase, boolean or wild character advanced searching.

To Use the Advanced Search Type (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=teen&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Advanced Phrase

Phrase searching is supported by the GET /{custid}/titles endpoint. When you would like to use search terms in the order in which they appear, phrase searching is needed. Use double quotes around your search terms and set the searchtype to advanced to use phrase searching.

To Use Phrase Searching (example):

Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=”Teen Ink: Our Voices, Our Visions”&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Advanced Boolean

To make your search more precise, boolean operators for your search terms are supported by the GET /{custid}/titles, GET /{custid}/packages, and GET /{custid}/vendors/{vendorid}/packages endpoints. You can use AND, OR and/or NOT to link your search words together. By narrowing or broadening your search, the boolean operators help you retrieve the information that you need quickly.

ANDORNOT
Each result contains all of the search terms.Each result contains at least one search term.Results do not contain the specified term(s).

Using the AND Operator

The AND operator combines search terms so that each search result contains all of the terms. For example, use search=sleep AND walking to find results that refer to both sleep and walking.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=sleep AND walking&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Using the OR Operator

The OR operator combines search terms so that each search result contains at least one of the terms. For example, use search=sleep OR waking to find results that reference the terms sleep or the term waking.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=sleep OR waking&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Using the NOT Operator

The NOT operator excludes terms so that each search result does not contain any of the terms that follow it. For example, use search=walking NOT waking to find results that contain the term walking but not the term waking.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=walking NOT waking&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Performing a Generalized Boolean Search

You can combine many terms in a search with operators. For example, use search=dog OR cat AND show OR parade to retrieve everything on dog or cat shows AS WELL AS everything on parades whether or not the articles refer to dogs or cats.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=dog OR cat AND show OR parade&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Performing a Focused Boolean Search

You can enclose search terms and their operators in parentheses to specify the order in which they are interpreted. Information within parentheses is read first, and then information outside parentheses is read next. For example, use search= (dog OR cat) AND (show OR parade) with parentheses to control your query to only find articles about shows or parades that reference dogs or cats.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=(dog OR cat) AND (show OR parade)&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced

Advanced Wildcard

Wildcard character searching is supported by the GET /{custid}/titles endpoint. Use the wildcard asterisk (*) to create searches where there are unknown characters, multiple spellings or various endings. None of the wildcards can be used as the first character in a search term. To use the asterisk (*) wildcard, enter the root of a search term and replace the ending with an *. For example, type comput* to find the words computer or computing.

Example Request

GET https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/titles?search=comput*&searchfield=titlename&selection=0&resourcetype=0&orderby=0&count=100&offset=1&searchtype=advanced