Page tree
Skip to end of metadata
Go to start of metadata

Overview

The XML REST API lets a search client pose a query to the AIE server using HTTP.  AIE"s reply to the client (containing metadata, matching documents, and a copy of the query) is a page of XML that the client can parse in order to display the results.  The results include the query because the process is asynchronous and results of multiple queries might return to the client out of order. 

This page explains the XML syntax of the query.  The rest of the XML response is described on the XML REST Response page.

To view a typical REST response, pose any query from the AIE Administrator's Debug Search page. 

The new-and-improved JSON REST API is easier to implement that the XML REST API.  Investigate that API first.

REST API Parameters

The master list of QueryRequest REST parameters is on the HTTP REST APIs page.

View incoming links.

 

Request

<queryRequest debug="true" offset="0" rows="10" locale="en" maxResubmits="3" resubmits="0" clientId="2992@10.2.1.68_bb34ef8d-3fa3-4c63-8dc0-89e0340c570b" redelivered="false">
  <metadata/>
  <spellCheck mode="SUGGEST" expandSize="2"/>
  <principal realm-id="Anonymous" principal-id="Anonymous" principal-name="Anonymous" principal-type="user"/>
  <highlighting enabled="false"/>
  <join rollupMode="CHILDREN" facetMode="DISTINCT" maxChildren="0"/>
  <acronyms mode="AUTO" boost="100"/>
  <lemmas mode="AUTO" boost="100"/>
  <query query="*:*" language="simple"/>
  <sortSpecification/>
  <facetFilters/>
  <facets>
    <facetRequest field="table" sortOrder1="ASCENDING" sortOrder2="DESCENDING" sortBy="VALUE" statistics="false" maxNumBuckets="10" minCutoff="1" distributedMaxNumBuckets="-1" distributedMinCutoff="1" facetFinder="true"/>
  </facets>
  <relevancyModel name="default"/>
  <scoreFunctions>
    <freshness field="date" center="2011-08-25T15:00:00.000+0000" centerResolution="HOURS" default="1970-01-01T00:00:00.000+0000" decay="0.085"/>
  </scoreFunctions>
  <filters/>
</queryRequest>

queryRequest

The queryRequest element is the root element of a query request, containing subQueries

Attribute

Type

Description

debug

Boolean

if true, provides debugging information in the reeponse

offset

long

the offset into the result set for the first returned document

rows

long

the number of documents to return

locale

string

Region/language locale to use. Affects things such as number or date display

Child Element

Count

Description

query

1

specifies the query for matching documents

spellCheck

1

specifies whether and how to spell-check the query

synonyms

1

controls synonym expansion of query terms

acronyms

1

controls acronym expansion of query terms

lemmas

1

controls lemmatization of query terms

query

Specifies the query string for matching documents

Attribute

Type

Description

query

string

The query string (Example: *:*)

language

string

The query language (simple or advanced)

spellCheck

Specifies spell checking options for the query

Attribute

Type

Description

mode

string

spell check mode: "OFF", "SUGGEST", "AUTOCORRECT" or "AUTOEXPAND"

expandSize

int

number of expansions to add in AUTO_EXPAND mode

synonyms

Specifies whether and how to expand synonyms

Attribute

Type

Description

mode

string

"ON", "OFF" or "AUTO"

boost

int

boost to apply to expanded synonyms

acronyms

Specifies whether and how to expand acronyms

mode

string

"ON", "OFF" or "AUTO"

boost

int

boost to apply to expanded acronyms

lemmas

Controls lemmatization of query terms

mode

string

"ON", "OFF" or "AUTO"

boost

int

boost to apply to expanded acronyms

facets

A container for facetRequest

Child Element

Count

Description

facetRequest

0 or more

specifies a request for one facet

facetRequest

Specifies a facet request for one field

Attribute

Type

Description

field

string

the field to facet on

sortOrder1

string

primary sort order: "ASCENDING" or "DESCENDING"

sortOrder2

string

secondary sort order: "ASCENDING" or "DESCENDING"

sortBy

string

how to sort the facet buckets: "COUNT" - by the no. of documents in the bucket, "VALUE" - by the value of the facet

statistics

Boolean

"true" or "false": if true, calculates statistics for the response

maxNumBuckets

int

max number of facet buckets to return

minCutoff

int

min bucket count for buckets returned

distributedMinCutoff

int

min bucket count for distributed indexes

facetFinder

Boolean

if true, the facet finder can replace this request with a suggested FacetRequest

  • No labels