Submit a Query

Verb name: Search
Verb version: 1.0
Required arguments: set [?], field, value, op
Optional arguments: sort, startResult, endResult, authority [?]
MIMETYPE of response: text/xml

Verb Description

Specifies a search request to an index server. Arguments indicate search criteria and the order and amount of search results to be returned. The response is a structured list of documents that match the search criteria, and includes a results summary. It is possible to request the results summary only.

Arguments

The arguments field[n], value[n], op[n], all enumerate, beginning with 1. [if we set a max value for n, we can write a schema to validate responses.]

Supported values for bibliographic field arguments may vary among index servers. The DescribeVerb verb returns the set of field values supported by a particular server. The arguments and values that must be submitted and/or supported are marked "required" in the following:

Operator Precedence: queries are assumed to be submitted using Reverse Polish Notation (RPN)

Rules for field matching: the value of the value argument is treated as a single string (word or phrase) and matched exactly as submitted; the wild card symbol * should be used to indicate truncation.

Response

Unless there is an error, all responses include a single resultsSummary and zero to many record elements.

Error Codes

Examples

Request

http://some.cgm.server/script?protocol=CGM&service=Index
	&verb=Search&ver=1.0&set=math&endResult=100
	&field1=author&value1=todhunter&op1=and
	&field2=title&value2=trigonometry

Response

<?xml version="1.0" encoding="UTF-8"?>
  <CGM service="Index">
    <responseDate>2002-10-01T19:20:30Z</responseDate>
    <request verb="Search" ver="1.0" set="math" endResult="100"
             field1="author" value1="todhunter" op1="and"
             field2="title" value2="trigonometry">
             http://some.cgm.server/script</request>
    <Search ver="1.0">
      <resultsSummary repositoryIdentifier="CULmath" set="math"
                      sort="title" totalResults="2" startResult="1"
                      endResult="2" />
      <record>
        <identifier>CULmath:cul.math/98765432</identifier>
        <title>Fun with Trigonometry</title>
        <author>Todhunter, I.</author>
        <author>Disney, W.</author>
        <pubdate>1888</date>
        <rank>2859</rank>
      </record>
      <record>
        <identifier>CULmath:cul.math/00640001</identifier>
        <title>Spherical Trigonometry</title>
        <author>Todhunter, I.</author>
        <pubdate>1886</date>
        <rank>2857</rank>
      </record>
    </Search>
  </CGM>

Request

http://some.cgm.server/script?protocol=CGM&service=Index
	&verb=Search&ver=1.0&set=math&startResult=0
	&field1=fulltext&value1=geometry&op1=and
	&field2=fulltext&value2=trigonometry

Response

<?xml version="1.0" encoding="UTF-8"?>
  <CGM service="Index">
    <responseDate>2002-10-02T19:20:30Z</responseDate>
    <request verb="Search" ver="1.0" set="math" startResult="0"
             field1="fulltext" value1="geometry" op1="and"
             field2="fulltext" value2="trigonometry">
             http://some.cgm.server/script</request>
    <Search ver="1.0">
      <resultsSummary repositoryIdentifier="CULmath" set="math"
                      sort="title" totalResults="1024" startResult="0"
                      endResult="0" />
    </Search>
  </CGM>

Request

http://some.cgm.server/script?protocol=CGM&service=Index
	&verb=Search&ver=1.0&set=CULmathbks
	&field1=author&value1=bush&op1=and
	&field2=fullbib&value2=basic%20counting

Response

<?xml version="1.0" encoding="UTF-8"?>
  <CGM service="Index">
    <responseDate>2002-10-02T19:20:30Z</responseDate>
    <request verb="Search" ver="1.0" set="math" field1="author"
             value1="bush" op1="and" field2="fullbib"
             value2="basic counting">http://some.cgm.server/script
             </request>
    <error code="noRecordsMatch" />
  </CGM>

Verb History

Substantial reworking and extension of Dienst verb SearchBoolean, version 5.0.