Searching for information
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 16, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Search IBM® Connections to find content that contains a specific text string in its title, description or content, or to find information tagged with a specific tag term. This article has been superseded by the "Search API" article.
You must specify at least one of the following parameters; you can specify more than one. Separate multiple parameters with an ampersand (&).

The Home page query syntax is based on the Lucene query parser syntax. However, only the syntax options listed in the description for the query parameter are supported. For more information, go to the following external web site:
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

You can use the ps and page parameters together or the results and start parameters together, but do not mix parameters from the two sets together.
* Identifies parameters that are supported in Lotus® Quickr™ searches.
 

Input
Method URI Description
GET /search/atom/search/results Search IBM Connections for public information.
GET /search/atom/mysearch/results Search IBM Connections for both public information and private information that you have access to. You must provide authentication information in the request to retrieve this resource.
Name Type Optional Description
component
enumerated Yes
Limits the search results to include items from a specific application. If you specify multiple applications, this parameter acts as an AND operator. To specify multiple applications, type a comma between each application name. For example, if you specify component=dogear,activities, the results would be limited to all of the activities that have been dogeared or all activity bookmarks that are also dogeared. Options are:
activities
blogs
calendar
communities
dogear
files
forums
profiles
status_updates
wikis

Authorized values:
  • activities
  • blogs
  • calendar
  • communities
  • dogear
  • files
  • forums
  • profiles
  • status_updates
  • wikis
email
string Yes Limits the results to only those items associated with the person who has the specified email address. For example, the person could be the author of an activity entry that is returned or a member of the community returned.
lang
enumerated Yes Specifies a language in which to search for a string. This parameter is optional. When specified, the appropriate dictionary for the specified language is loaded. You can specify any of the following language codes:
ar
Arabic
cs
Czech
da
Danish
de
German
el
Greek
en
English
es
Spanish
fi
Finnish
fr
French
it
Italian
ja
Japanese
ko
Korean
nb
Norwegian
nl
Dutch
pl
Polish
pt-BR
Brazilian Portuguese
pt-PT
Iberian Portuguese
ru
Russian
sv
Swedish
zh
Chinese
Note: The dictionary for the language specified must be enabled for this parameter to work. See Configuring dictionaries for search for more details.
Authorized values:
  • ar
  • cs
  • da
  • de
  • el
  • en
  • es
  • fi
  • fr
  • it
  • ja
  • ko
  • nb
  • nl
  • pl
  • pt-BR
  • pt-PT
  • ru
  • sv
  • zh
page
int Yes Page number. Specifies the page to be returned. The default value is 1, which returns the first page.
ps
int Yes Page size. Specifies the number of entries to return per page. The default value is 10. The maximum value you can specify is 150.
query
string Yes Text to search for. Returns a list of results with the specified text in the title, description, or content. Encode the strings. By default, spaces are treated as an AND operator. The following operators are supported:
AND or &&: Searches for items that contain both words. For example: query=red%20AND%20test returns items that contain both the word red and the word test. AND is the default operator.
NOT or !: Excludes the word that follows the operator from the search. For example: query=test%20NOT%20red returns items that contain the word test, but not the word red.
OR: Searches for items that contain either of the words. For example: query=test%20OR%20red
To search for a phrase, enclose the phrase in quotation marks (" ").
+: The plus sign indicates that the word must be present in the result. For example: query=+test%20red returns only items that contain the word test and many that also contain red, but none that contain only the word red.
?: Use a question mark to match individual characters. For example: query=te%3Ft returns items that contain the words test, text, tent, and others that begin with te.
-: The dash prohibits the return of a given word. This operator is similar to NOT. For example: query=test%20-red returns items that contains the word test, but not the word red.
Note: Wildcard searches are permitted, but wildcard only searches (*) are not.
For more details about supported operators, see Advanced search options in the Using section of the product documentation.
tag
string Yes Tag to search for. Returns a list of results with the specified tag. You can use this parameter multiple times to search for content that is tagged with all of the tag terms.
userid
string Yes Limits the results to only those items associated with the person who has the specified user ID. This parameter overwrites the email parameter if both are specified.
result
string Yes Synonymous with ps parameter.
start
int Yes Defines an offset from the first result in the set. This parameter is ignored if a page parameter is provided. This starts from 0. The default is 0.
Output
Content Type: application/atom+xml
Code Description
200
OK. Indicates that the request was received successfully.
Examples
Here are some quick query syntax examples: query=red&component=blogs&component=dogear Returns all of the blogs that have been bookmarked in Bookmarks and that contain the word red. query=red&tag=colour Returns any items containing the word red and that are tagged with the term colour. query=red&component=activities&userid=myuserid Returns all of the activities that contain the word red that the user specified by the myuserid is involved in. query=red&userid=myuserid&userid=youruserid Returns all of the items that contains the word red and that the person specified by the myuserid and the person specified by the youruserid are both involved.

To search for all content across IBM Connections that contains the text Red:
> GET /search/atom/search/results?query=%22Red%22 HTTP/1.1

	> Host: example.enterprise.com:9443

	> Accept: */*


Response returned by the server
<?xml version="1.0" encoding="UTF-8" ?>

	<feed

	xmlns="http://www.w3.org/2005/Atom"

	xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"

	xmlns:relevance="http://a9.com/-/opensearch/extensions/relevance/1.0/"

	xmlns:snx="http://www.ibm.com/xmlns/prod/sn">

	<title>"Red"</title>

	<link

	href="https://example.enterprise.com:9443/search/atom/search/

	results?query=%22Red%22" rel="self" />

	<updated>2008-10-07T22:58:03Z</updated>

	<id>https://example.enterprise.com:9443/search/atom/search/

	results?query=%22Red%22</id>

	<openSearch:totalResults>2309</openSearch:totalResults>

	<openSearch:itemsPerPage>10</openSearch:itemsPerPage>

	<openSearch:startIndex>1</openSearch:startIndex>

	<link

	href="http://search-server:9080/search/atom/search/facets/

	source?query=%22Red%22" rel="related" />

	<link href="http://search-server:9080/search/atom/search/facets/

	tags?query=%22Red%22" rel="related" />

	<link href="http://search-server:9080/search/atom/search/facets/

	people?query=%22Red%22" rel="related" />

	<link href="http://search-server:9080/search/atom/search/

	results?query=&quot;Red&quot;&page=2" rel="next" />

	<link href="http://search-server:9080/search/atom/search/

	results?query=&quot;Red&quot;&page=230" rel="last" />

	<openSearch:Query role="request" searchTerms=""Red"" />

	<entry>

	<title>Boston Red Sox - Red Sox - Boston.com</title>

	<link href="http://www.boston.com/sports/baseball/redsox/" />

	<id>urn:uri:1547735</id>

	<updated>2007-12-22T13:26:40+00:00</updated>

	<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="search" />

	<category scheme="http://www.ibm.com/xmlns/prod/sn/component" term="dogear" />

	<category term="red" />

	<category term="red_sox" />

	<category term="sports" />

	<category term="sox" />

	<category term="baseball" />

	<author>

	<name>John E. Smith</name>

	<snx:userid>177crjc0-8f0a-1028-8f0c-db93503b53t4</snx:userid>

	</author>

	<summary type="html" />

	<relevance:score>5.4105196</relevance:score>

	</entry>

	...

	</feed>