Searches the CAF for addresses matching the criteria specified.
Declaration Syntax
Parameters
- apiKey (String)
- The API key provided with your CAF licence
- addressField (AddressField)
- Which address field to search. See AddressField for a list of possible values.
- searchText (String)
- The text to search for.
- includeHistoric (Boolean)
- If true, addresses are included where historic versions match. For example if the name of a house has changed, this parameter allows you to search against its old name. Note that in all cases the returned addresses will be the current versions and therefore may not include the words searched for in includeHistoric is set to true.
- includeInactive (Boolean)
- Specifies whether to include inactive addresses or not. See the Active field on the Address class.
- useMetaphone (Boolean)
- Specifies whether to use the Metaphone algorithm for a 'soundalike' search
- sortBy (AddressOrdering)
- Specifies the order of the results - see AddressOrdering
- sortDescending (Boolean)
- A boolean which reverses the result order
- classifications (String)
- A comma-separated list of classifications to search against (see GetTermCode(String, Int32, String))
Return Value
A SearchResults object containing all entries matching the specified criteria.
The ResultCount property indicates how many addresses in total match the criteria, regardless of the maxResults parameter.
Remarks
The CAF search is a word-based search. The searchText parameter is split into words and addresses are returned if they contain every word. Phrases may be enclosed in double quotes.
The 'useMetaphone' flag uses the Metaphone algorithm to permit words to match 'soundalike' words.