2. Searching the OAI database by web service
Prev | Chapter 3. Tutorial | Next

## 2. Searching the OAI database by web service

Zebra has a build-in web service, which is close to the SRU standard web service. We use it to access our new database using any XML enabled web browser. This service is using the PQF query language. In a later section we show how to run a fully compliant SRU server, including support for the query language CQL

Searching and retrieving XML records is easy. For example, you can point your browser to one of the following URLs to search for the term `the`. Just point your browser at this link: http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the

### Warning

These URLs won't work unless you have indexed the example data and started an Zebra server as outlined in the previous section.

In case we actually want to retrieve one record, we need to alter our URL to the following http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=dc

This way we can page through our result set in chunks of records, for example, we access the 6th to the 10th record using the URL http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=6&maximumRecords=5&recordSchema=dc

Prev | Up | Next
Chapter 3. Tutorial | Home | 3. Presenting search results in different formats