API Keyword Search

The /v6/bibs/search endpoint offers the ability to perform keyword searches using the Advanced Word Search (AWS) index. The AWS index takes strings of text from specified variable-length fields and indexes each word separately. You can search either the entire AWS index or a subset of it (referred to as a "segment" or "slice").

For more information on keyword searching, see the following Sierra WebHelp topics:

Index and Index Rules

More about the Advanced Word Index

Performing a Keyword Search

During an AWS search, you must enter a text parameter to specify the search term. If you want to search a specific segment of the AWS index, you can use the optional index parameter. Segments include:

  • author
  • title
  • subject
  • note

For example:

  • Author search: The index parameter is "author", and the text parameter identifies the author's name.
  • Title search: The index parameter is "title", and the text parameter identifies the title.

If you do not specify an index parameter, the system searches the entire AWS index. For information on other search parameters, see the interactive documentation for this endpoint.

Regardless of parameters you use for searching, this endpoint returns search results using the same relevance ranking as the WebPAC. See Searching the WebPAC With RightResult in the Sierra WebHelp for more information about this relevance ranking.

Keyword Search Example

The following example shows a keyword search using the /v6/bibs/search endpoint. This search uses the optional limit parameter to query five records. The required text parameter specifies the search string "Harry Potter". No index parameter is used.

Request URL

https://example-library.edu:443/iii/sierra-api/v6/bibs/search?limit=5&text=Harry%20Potter

Response

{
  "count": 5,
  "total": 990,
  "start": 0,
  "entries": [
    {
      "relevance": 2.4000000953674316,
      "bib": {
        "id": "5034758",
        "updatedDate": "2019-10-19T21:04:54Z",
        "createdDate": "2019-07-30T10:48:56Z",
        "deleted": false,
        "suppressed": false,
        "lang": {
          "code": "   "
        },
        "title": "Lego Harry Potter Hogwarts Yearbook 2020",
        "author": "",
        "materialType": {
          "code": "a  ",
          "value": "Book"
        },
        "bibLevel": {
          "code": "m",
          "value": "Monograph"
        },
        "country": {
          "code": "   ",
          "name": "No country"
        }
      }
    },
    {
      "relevance": 2.4000000953674316,
      "bib": {
        "id": "5055525",
        "updatedDate": "2019-10-15T12:33:37Z",
        "createdDate": "2019-10-08T17:10:52Z",
        "deleted": false,
        "suppressed": false,
        "lang": {
          "code": "   "
        },
        "title": "Harry Potter and the Cursed Child: The Journey: Behind the S",
        "author": "Productions Harry Potter Theatrical",
        "materialType": {
          "code": "a  ",
          "value": "Book"
        },
        "bibLevel": {
          "code": "m",
          "value": "Monograph"
        },
        "country": {
          "code": "   ",
          "name": "No country"
        }
      }
    },
    {
      "relevance": 2.4000000953674316,
      "bib": {
        "id": "5023908",
        "updatedDate": "2019-10-17T02:12:17Z",
        "createdDate": "2019-07-03T10:44:11Z",
        "deleted": false,
        "suppressed": false,
        "lang": {
          "code": "eng",
          "name": "English"
        },
        "title": "Harry Potter - spells & charms : a movie scrapbook.",
        "author": "",
        "materialType": {
          "code": "a  ",
          "value": "Book"
        },
        "bibLevel": {
          "code": "m",
          "value": "Monograph"
        },
        "publishYear": 2019,
        "catalogDate": "2019-08-22",
        "country": {
          "code": "enk",
          "name": "England"
        }
      }
    },
    {
      "relevance": 2.4000000953674316,
      "bib": {
        "id": "5057471",
        "updatedDate": "2019-10-17T02:14:33Z",
        "createdDate": "2019-10-16T08:27:19Z",
        "deleted": false,
        "suppressed": false,
        "lang": {
          "code": "eng",
          "name": "English"
        },
        "title": "Back to Hogwarts: From the films of Harry Potter. ",
        "author": "Scholastic",
        "materialType": {
          "code": "a  ",
          "value": "Book"
        },
        "bibLevel": {
          "code": "-",
          "value": "---"
        },
        "country": {
          "code": "   ",
          "name": "No country"
        }
      }
    },
    {
      "relevance": 2.4000000953674316,
      "bib": {
        "id": "5023971",
        "updatedDate": "2019-10-22T10:09:45Z",
        "createdDate": "2019-07-03T12:22:21Z",
        "deleted": false,
        "suppressed": false,
        "lang": {
          "code": "eng",
          "name": "English"
        },
        "title": "Harry Potter and the prisoner of Azkaban",
        "author": "Rowling, J. K., author.",
        "materialType": {
          "code": "a  ",
          "value": "Book"
        },
        "bibLevel": {
          "code": "m",
          "value": "Monograph"
        },
        "publishYear": 2019,
        "catalogDate": "2019-07-04",
        "country": {
          "code": "enk",
          "name": "England"
        }
      }
    }
  ]
}