Searches a specific vocabulary and retrieves the matching vocabulary items.Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: 22.214.171.124 (1.15.1003.9505)
'Declaration Public Shared Function SearchVocabulary ( _ connection As HealthServiceConnection, _ vocabularyKey As VocabularyKey, _ searchValue As String, _ searchType As VocabularySearchType, _ maxResults As Nullable(Of Integer) _ ) As VocabularyItemCollection
- Type: Microsoft.Health..::..HealthServiceConnection
The connection to use for this operation. The connection must have application capability.
- Type: Microsoft.Health..::..VocabularyKey
The VocabularyKey defining the vocabulary to search. If the family is not specified, the default HealthVault vocabulary family is used. If the version is not specified, the most current version of the vocabulary is used.
- Type: System..::..String
The search string to use.
- Type: Microsoft.Health..::..VocabularySearchType
The type of search to perform.
Return ValueA VocabularyItemCollection populated with entries matching the search criteria.
This method does text search matching of display text and abbreviation text for the culture defined by the Culture. The searchValue is a string of characters in the specified culture.
If vocabularyKey is null.
If searchValue is null or empty or greater than 255 characters.
if searchType is not a known VocabularySearchType value.
when maxResults is defined but has a value less than 1.
There is an error in the server request.
The requested vocabulary is not found on the server.
-Or- The requested search culture is not supported.