Auto-Complete Concept Label Search

Description

Retrieves a list of concepts whose preferred or alternate labels contain any words that start with the provided conceptName string, to assist with user entries in auto-complete fields. For example, the conceptName "lymph" would match the label "lymphoma' and the label "malignant lymphoma".

Syntax

/content/vocabulary/labels/{vocName}?{queryString}

NOTE: vocName is the vocabulary identifier in the describes resource URI for the vocabulary (for example, SciValFunders).

Input Parameters

The input parameters for the query string are described in the following table.

Parameter

Required?

Multiple Instances Allowed?

Description

conceptName

Yes

No

The string on which to match the start of words in the preferred label of a concept (for example, National Aeronautics and Space Administration), or an alternative label of a concept (for example, NASA) in the vocabulary. The conceptName is case-insensitive.

Stop words in the "starts with" string are ignored.

The following stop words in a partial "starts with" string are ignored when performing the search for matching concept labels: a, an, and, are, as, at, be, but, by, for, if, in, into, is, it, no, not, of, on, or, such, that, the, their, then, there, these, they, this, to, was, will, with

resultsToReturn

No

No

The number of results to return. The default is 10.

The maximum allowed number of results is 100.

doNotOrderByPrefLabel No No

Determines whether the results will be sorted by the preferred labels.

Possible values are:

  • True: The results will be sorted by relevancy ranking.
  • False (the default): The results will be sorted by the preferred labels.

Results

For each matching concept in the vocabulary, the following information is returned:

  • The concept ID.
  • The preferred label
  • Any preferred and/or alternate labels that matched the conceptName string.

The list of matching concepts is ordered according to the value set for the doNotOrderByPrefLabel parameter.

If no matches are found, an empty response is returned.

Example Queries

Example 1 Query: Matching the "Starts With" String nas, Maximum Results = 50

The following call retrieves the concepts in the SciValFunders vocabulary whose labels match the conceptName string nas and the maximum number of results to return set to 50:

http://data.elsevier.com/content/vocabulary/labels/SciValFunders?conceptName=nas&resultsToReturn=50

This query returns the following result:

[

{"conceptId":"SciValFunders/100002241","prefLabel":"Nasdaq OMX","matchedLabels":["Nasdaq OMX"]},

{"conceptId":"SciValFunders/100000209","prefLabel":"National Academy of Sciences","matchedLabels":["NAS"]},

{"conceptId":"SciValFunders/100005965","prefLabel":"National Academy of Social Insurance","matchedLabels":["NASI"]},

{"conceptId":"SciValFunders/100000104","prefLabel":"National Aeronautics and Space Administration","matchedLabels":["NASA"]},

{"conceptId":"SciValFunders/100003202","prefLabel":"North American Spine Society","matchedLabels":["NASS"]},

{"conceptId":"SciValFunders/100005764","prefLabel":"Utah Rocky Mountain NASA Space Grant Consortium","matchedLabels":["Utah Rocky Mountain NASA Space Grant Consortium"]}

]

Example 2 Query: Matching the "Starts With" String org

The following call retrieves the concepts in the SciValFunders vocabulary whose labels match the conceptName string org:

http://data.elsevier.com/content/vocabulary/labels/SciValFunders?conceptName=org&resultsToReturn=50&doNotOrderByPrefLabel=true

This query returns the following result:

[

{"conceptId":"SciValFunders/100000154","prefLabel":"Division of Integrative Organismal Systems","matchedLabels":["Division of Integrative Organismal Systems"]},

{"conceptId":"SciValFunders/100001260","prefLabel":"National Organization for Rare Disorders, Inc.","matchedLabels":["National Organization for Rare Disorders, Inc."]},

{"conceptId":"SciValFunders/100002249","prefLabel":"National Organization for Hearing Research Foundation","matchedLabels":["National Organization for Hearing Research Foundation"]},

{"conceptId":"SciValFunders/100002633","prefLabel":"Association for Research on Non-Profit Organizations & Voluntary Action","matchedLabels":["Association for Research on Non-Profit Organizations & Voluntary Action"]},

{"conceptId":"SciValFunders/100004022","prefLabel":"Organic Farming Research Foundation","matchedLabels":["Organic Farming Research Foundation"]},

{"conceptId":"SciValFunders/100004410","prefLabel":"European Molecular Biology Organization","matchedLabels":["European Molecular Biology Organization"]},

{"conceptId":"SciValFunders/100004415","prefLabel":"North Atlantic Treaty Organization","matchedLabels":["North Atlantic Treaty Organization"]},

{"conceptId":"SciValFunders/100004423","prefLabel":"World Health Organization","matchedLabels":["World Health Organization"]},

{"conceptId":"SciValFunders/100005098","prefLabel":"Organization for Autism Research","matchedLabels":["Organization for Autism Research"]},

{"conceptId":"SciValFunders/100005230","prefLabel":"Organization of American States","matchedLabels":["Organization of American States"]},

{"conceptId":"SciValFunders/100005243","prefLabel":"United Nations Educational, Scientific and Cultural Organization","matchedLabels":["United Nations Educational, Scientific and Cultural Organization"]},

{"conceptId":"SciValFunders/100005365","prefLabel":"American Federation of Labor - Congress of Industrial Organizations","matchedLabels":["American Federation of Labor - Congress of Industrial Organizations"]}

]

Error Return Codes

If an error occurs, the following standard HTTP error response codes are returned:

  • 500: A server-side error unrelated to the client query (for example, the server is down, or the code contains a null pointer).
  • 4xx: A client-side error; specifically for this API, one of the following:
    • 400: There is a syntax error in the query (for example, the query is missing a required parameter or includes an invalid argument).
    • 404: No content exists (for example, there is no match for the concept URI).
    • 405: The call is using an HTTP method that is not supported for this API.

Along with the error, a text message that briefly explains the problem is returned.

The following error messages can also be returned by this API:

  • Authentication Error Occurred. Authentication Failure. An invalid vocabulary identifier was provided.
  • Invalid request. Invalid param value: parameter[resultsToReturn] with value[-x] should be greater than zero. The resultsToReturn value must be a positive number.
  • Invalid request. Invalid param value: parameter[resultsToReturn] with value[0] should be greater than zero. The resultsToReturn value must be a positive number.
  • Invalid request. Invalid param value: parameter[resultsToReturn] with value[x] should be within the threshold limit [1 - 100]. The resultsToReturn value must be a positive number between from 1 to 100.
  • Invalid request. Multiple conceptName cannot be provided for this request. Only one conceptName string can be specified in the API call.
  • Invalid request. Minimum of 2 characters have to be entered for conceptName. The conceptName string must be at least two characters long.
  • Invalid request. Missing mandatory param: conceptName. A conceptName string was not included in the API call.

If a valid query returns 0 results, an empty result set is returned.

Contact Us About Elsevier Terms and Conditions Privacy Policy

Copyright © 2017 Elsevier B.V.  All rights reserved.