This information relates to the ‘Highlight’ response field, which is returned when making a Capture Find or Geocoding Typeahead API call.
Text
and Description
fields match the user’s search term.
This can be used to determine which characters should be highlighted in bold in the search field, to give the user a visual representation of what’s being searched.
If a Container Id is included in a Capture Find request, Highlight will be empty. It will be populated for any other request.
Considerations
- Highlight ranges are expressed as ‘X-Y’ where highlighting should start from character position X and go up to but not including character position Y
- Characters start from position 0
-
Commas separate numbers within a single field, while a semicolon separates numbers in
Text
from numbers inDescription
- Spaces are counted as characters
-
If no characters in
Text
should be highlighted, the string will start with a semicolon
Example
Take this example:Text
field should be highlighted, and also characters 1, 2 and 3 in the Description
field.