Retrieving the tags related to a set of search resultsAdded by IBM on September 12, 2012 | Version 1 (Original)
|DEPRECATED API. Refer to the Facets API.
This API is deprecated. It is recommended that you refer to the Facets
® Connections to find all of the content that contains a specific text string in its title, description or content, or that contains information tagged with a specific tag term, and then return the tags related to the results. Search returns are limited to 100 tags.
Table 1. Atom API request details
Search IBM Connections for public information, and then return the tags associated with the results.
Search IBM Connections for both public information and private information that you have access to, and then return the tags associated with the results. You must provide authentication information in the request to retrieve this resource.
You must specify at least one of the following parameters; you can specify more than one. Separate multiple parameters with an ampersand (&).
Table 2. Input parameters
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:
Limits the search results to include items from a specific application. If you specify multiple applications, this parameter acts as an OR operator. To specify multiple applications, type a comma between each application name. For example, if you specify components=dogear,activities, the results would include all items from Activities or Bookmarks that match the search criteria. Options are:
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.
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:
Note: The dictionary for the language specified must be enabled for this parameter to work. See Configuring dictionaries for search for more details.
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.
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.
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.
To retrieve the tags associated with the search results returned when you search for the term "Red Sox", send the following HTTP request:
> GET /search/atom/search/facets/tags?query=%22Red%20Sox%22 HTTP/1.1
> Host: enterprise.example.com:9443
> Accept: */*
The following content is returned by the server:
Parent topic: Getting Search feeds
Search result entry content
<?xml version="1.0" encoding="UTF-8" ?>
<category snx:frequency="14" term="baseball" />
<category snx:frequency="3" term="baseball-news" />
<category snx:frequency="1" term="beckett" />
<category snx:frequency="4" term="boston" />
<category snx:frequency="1" term="varitek" />
<category snx:frequency="1" term="wakefield" />