Overview of the XML Query Result Set Interface

The XML Query Result Set Interface (RSI) enables you to perform queries in XML and return results as XML, avoiding the SQL layer and requirement to work within SELECT semantics. The Result Set Interface uses a simple text query and an XML result set descriptor, where the hitlist is returned in XML according to the result set descriptor. The XML Query Result Set Interface uses SDATA sections for grouping and counting.

A page of search results in applications can consist of many disparate elements such as metadata of the first few documents, total hit counts, per-word hit counts, and so on. Each extra call takes time to reparse the query and look up index metadata. Additionally, some search operations such as iterative query refinement are difficult for SQL. If it is even possible to construct a SQL statement to produce the desired results, such SQL is usually suboptimal.

The XML Query Result Set Interface is able to produce the various kinds of data needed for a page of search results all at once, thus improving performance by sharing overhead. The Result Set Interface can also return data views that are difficult to express in SQL.