search_search

Returns XML for results of a search query.

Syntax

public String search_search( String accessToken, String query, int offset, int maxResults );

Description

The search_search operation returns XML for the results of a search query represented in XML. Because the list of each results can be lengthy, this operation is designed so that you can make multiple calls, receiving a subset of the search results each time.

Parameters and Return Value

accessToken

Either the security token passed to your application by Teaming as part of implementing a remote application, or the null value.

query

A search query represented in XML.

offset

An integer indicating at which result you want to begin receiving information. The first result is numbered 0.

maxResults

An integer indicating the number of results you want returned.

return_value

A string of XML containing information about the search results that match your specified criteria.

Example

The following input query string in XML matches all users whose first name begins with the letter J or the last name is Smith.

<QUERY>
     <AND>
          <FIELD fieldname="_entityType" exactphrase="true">
               <TERMS>user</TERMS>
          </FIELD>
          <FIELD> fieldname="_docType" exactphrase="true">
               <TERMS>entry</TERMS>
          </FIELD>
          <OR>
               <FIELD fieldname="_lastName">
                    <TERMS>Smith</TERMS>
               </FIELD>
               <FIELD fieldname="_firstName">
                    <TERMS>J*</TERMS>
               </FIELD>
          </OR>
     </AND>
</QUERY>

See Also