Indexing and Search Service Web Service API

Skip to end of metadata
Go to start of metadata

Indexing and Search Service Web Service API

This information provides an overview and describes the HTTP GET parameters currently supported in Indexing and Search Service (ISS).

Topics:

Overview of ISS Web Service API

The ISS web service API is a RESTful web service. It takes a URI through HTTP GET and returns search results by following the OpenSearch 1.1 specification in either RSS 2.0, Atom 1.0, or JSON format.

The search URI consists of http://iss-host:port/rest/search and mandatory q= and optional parameters. The default port is 8080.

Note
These examples assume that you are already logged in to ISS. To log in, navigate to http://iss-host:port/rest.

The following search returns all emails with test in the subject line for user1 on the email server demo.example.com.

http://demo.example.com:8080/rest/search?q=%2busername:user1%20%2bhostname:isshost.example.com%20%2bsubject:test

More sample URIs can be found at the welcome page, http://iss-host:port/rest.

HTTP GET Parameters

The following sections describe the HTTP GET parameters that are currently supported.

Search Query Parameter

q=search_query_in_lucene_query_parser_syntax

The search query needs to follow the Lucene query parser syntax using a specific list of Lucene field names that were used for indexing the content. For more information, see Indexing and Search Service Query and Sort Criteria Summary.

Optional Data Type Parameter

t=supported_data_type

The optional data type parameter enables you to search across all data types or a specific data type within ISS indexed data. Currently, ISS supports only the email data type.

Optional Format Parameter

format=either_RSS_or_ATOM_or_JSON

The optional format parameter enables a client to receive search results in either RSS 2.0, Atom 1.0, or JSON format per OpenSearch 1.1 specification. The default is RSS.

Optional Sort Parameter

sort=sort_criteria

The optional sort criteria enables you to sort search results based on particular criteria. Currently, only a subset of indexed field names can be sorted on by ISS. You can find a complete list of sort criteria for the email data type here.

Optional Start Index Parameter

s=start_from_this_item_number

The optional start index enables a client to choose from which number to return the search result. The default start index is 0.

Optional Count per Page Parameter

c=num_of_results_per_page

The optional number of search results per page enables a client to request a specific number of returned items. The default number of results per page is 10. This number can be used with or without the optional start index parameter.

Optional Content Format Parameter

contentFormat=format_selector

The optional contentFormat selector enables a client to request additional formatting for results returned from a search call. The default format is standard format (for email, currently). When the standard content format is specified, the results contain IMAP URIs providing a compact representation of the account, folder, and UID of the message with the match.

Note
The IMAP URI should be consumed by an IMAP client to provide access to the data. The URI will not be directly usable by a web browser.

Other formats that can be specified are attachmentOnly, simpleUID, and MJS. When attachmentOnly is specified, each result contains URLs to the original attachment and any thumbnails that correspond to it (refer to thumbnail= option below). Also, the totalResults and count-per-page values returned refer to the number of attachments located, not the number of emails. When simpleUID is specified, the result for each entry contains only the UID number of the matched email. This option applies only when format=ATOM. It is intended to speed up queries to a single folder, such as those queries through IMAP. When MJS is specified (only valid when format=JSON), the output is formatted in compact WMAP (webmail) format.

Optional Thumbnail Parameter

thumbnail=size

The optional thumbnail size enables a client to request the size of the thumbnail referenced when the contentFormat=attachmentOnly option is also specified. The DEFAULT size causes no thumbnail URL to be generated. Other sizes that can be specified are S, M, L, and XL for small, medium, large, and extra large. If one of these sizes is specified, a URL reference for that size thumbnail appears in the description field of each result.

Optional JavaScript Callback Parameter (JSON Format Only)

This feature is available starting with Indexing and Search Service 1 Update 1.

callback=function_name

The optional JavaScript callback parameter enables a client to request that the JSON results be wrapped inside a JavaScript callback function specified by the client. For example, setting callback=function_name will generate the following output:

function_name({
		"title": "iss-host:iss-port search: search-query",
		"link": "http://iss-host:iss-port/rest/search?q=search-query&c=100&format=json",
	"modified": "Mon Feb 08 22:02:48 GMT 2010",
	"opensearch:totalResults": "0",
	"opensearch:startIndex": "0",
	"opensearch:itemsPerPage": "100",
	"items": [
	]
})

Optional Timeout Parameter

This feature is available starting with Indexing and Search Service 1 Update 1.

timeoutmsec=number_of_milliseconds

The optional timeout parameter enables a client to request how many milliseconds to wait for a search query response before returning from a search request. If the search response was not obtained before the timeout, a 500 error (Waiting for response timed out on request) is returned. The default timeout is specified in jiss.conf with the iss.searchsvc.response.timeout parameter.

Labels:
indexsearchservice indexsearchservice Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Oracle community and they might not be employed or in any way formally affiliated with Oracle. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Oracle nor any other party necessarily agrees with them.