GET /glossary/api/v4/search

GET /glossary/api/v4/search

Use this URI to search for business terms in a business glossary. Requires a valid JSESSIONID cookie as part of this HTTP request. Results are filtered based on the user's permissions.

Parameters

The following table describes the query parameters for the GET /glossary/api/v4/search URI request:
Parameter
Description
query
Required. Search query string.
Input is not case sensitive.
hideInactiveTerms
Optional. If you want to hide inactive business terms set this parameter value to True .
The default value is False.

Returns

The number of search results and an ordered list of matched business terms. Results are limited to published terms that the user has the permission to access.

Return Values

The following table describes the return values for the GET /glossary/api/v4/searchURI request:
Return Value
Description
resultCount
Count of the number of search results.
Reflects the total number of hits limited to the maximum result count specified by an administrator on a business glossary that is in the Analyst Service.
For example, if your search query produces 1000 hits, but the administrator specified a maximum result count of 500, then the value of resultCount is 500.
originalQuery
The original search query.
spellCheckQuery
Provides another query if the user's query was changed by spell check. If the two queries are the same, then spell check was not performed.
searchStatus
Additional status code that describes the search status:
Enums:[OK | INDEX_OCCURRING]
Use the following enumerated types in the searchStatus:
  • OK. Search completed without warning.
  • INDEX_OCCURRING. Indexing was in progress while performing a search.
results
Representation of search results.
id
Unique string identifier for a business term.
attributes
Details of an attribute.
id
Unique identifier for an attribute.
label
The display name of the attribute.
value
Value of an attribute.
categoryIds
List of category identifiers that the business term belongs to.
fragments
Highlight information for the current search result.
attrId
Identifier for the attribute that must be highlighted in a particular search result.
categoryDetails
List of details of categories returned in the search result.
description
List of descriptions for each level of the category.
id
Identifier of the category that matches the list of category identifiers for a particular search result.
path
The path to this category. This is a string array that begins as a top level element to the category in the business glossary.

Responses

The following responses can occur for the GET /glossary/api/v4/search URI request:
HTTP Return Code: 200
Response to a search query. For example:
{ "processingTime": 264, "originalQuery": "customer", "spellCheckQuery": "customer", "searchStatus": "OK", "resultCount": 1, "results": [ { "id": "843102494926109", "categoryIds": [ "222678635555534" ], "attributes": [ { "id": "name", "label": "name", "value": "customer" }, { "id": "infa_description", "label": "infa_description", "value": "This is a great customer" }, { "id": "phase", "label": "phase", "value": "PUBLISHED" } ], "fragments": [ { "attrId": "name", "fragments": [ "customer" ] } ] } ], "categoryDetail": [ { "id": "222678635555534", "path": [ "BG", "category1" ], "description": [ "glossary description", "category description" ] } ] }
HTTP Return Code: 400
Response to a missing request parameter. For example:
{ "errorCode": "BG1003", "message": "Invalid request, missing either parameter {'%s'} or its value." }
HTTP Return Code: 401
Expired session.
HTTP Return Code: 403
Response to a search query that is not valid. For example:
{ "errorCode": "BGREST_1211", "message": "[SearchServiceClient_00013] The search string is not valid. You cannot start a search string with wildcard characters * or ?." }
HTTP Return Code: 404
This API method will never return an error.
HTTP Return Code: 500
Response to an internal search error. For example:
{ "errorCode": "BGREST_1211", "message": "No Search Service is associated with Model Repository Service ['MRS_BG']. To perform a search, create a Search Service, associate it with the Model Repository Service, and ensure that it is enabled." }

Query String Format

Use the following rules and guidelines to format a query string:
  • Provide a string that represents what the user wants to search for.
  • The search string must contain one or more tokens. A token is a word that is separated by whitespace.
  • Tokens in common English suffixes must return matches to business terms containing words with different suffixes or no suffix. This is applies across all fields, including name. For example:
    "order" matches "order" and "ordered"
    "eat" matches "eaten" not "ate"
  • Results contain all business terms that contain any of the tokens provided. Tokens must be separated by the logical operator OR. Results must contain no business terms that do not match any tokens in the query.
  • Quotes around a group of tokens indicates a phrase search. Results contain the exact phrase.
  • If a token contains a wildcard (*) character, it indicates a wildcard search. The (*) character must be interpreted to match any set of non-whitespace characters. The (*) character cannot be used as a prefix. For example:
    cat* matches "category" and "caterpillar"
    *cat is not allowed.
    em*ee matches "employee" but not "empty coffee"
  • Backslash ( \) must be used to escape quotes or (*,) which are considered special characters.
  • All other special characters must be treated as normal characters during search.

0 COMMENTS

We’d like to hear from you!