Autosuggest Media Type
The autosuggest
media type describes suggested places and searches
Media Type URI
urn:nlp-types:autosuggest
Attribute | Type | Description |
---|---|---|
results | Array[AutosuggestPlace | AutosuggestQueryCompletion | AutosuggestSearch] |
Suggested Place
A link to a suggested place. Additional information is included that can be displayed to the user to help them to decide if this is the place they are interested in. It has the following attributes:
Attribute | Type | Description |
---|---|---|
title | String | A title for this place to be displayed to the user. |
highlightedTitle | String | The same content as the 'title' field. However, it contains markup highlighting the parts of the string that were matched. |
vicinity | String (formatted text); optional | The textual description of the location of the place; usually derived from the address of the place, but may also contain any other description that helps a user understand where the place is located. |
highlightedVicinity | String (formatted text); optional | The same content as the 'vicinity' field. However, it contains markup highlighting the parts of the string that were matched. |
position | Array[Number] | The latitude and longitude of the place, for example [37.785141,-122.4047775] . This latitude and longitude is suitable for displaying the place's position on a map. |
category | String; optional | A category id or name for this place. |
categoryTitle | String | The (localized) display name of the category. For example, Eat & Drink . |
bbox | Array[Number]; optional | A bounding box that is associated with this place, e.g. for moving the map view. |
href | String (URI) | A hyperlink that refers to the resource with details for this place |
type | String | All Autosuggest place and address results have type 'urn:nlp-types:place' |
resultType | String | The type of Autosuggest result item which can be 'place' for a Place and 'address' for an Address |
id | String | The unique identifier of the place. |
distance | Number (integer); optional | Distance to the destination in meters calculated as described in Search Location and Distance Calculation. |
chainIds | Array[String]; optional | List of IDs of the chains that this place belongs to. |
Suggested Completion
A suggested completion of the given query string. This is basically a new Autosuggest query. Follow the href to trigger the suggested query for the completed term.
Attribute | Type | Description |
---|---|---|
title | String | A title for this query completion to be displayed to the user. |
highlightedTitle | String | The same content as the 'title' field. However, it contains markup highlighting the parts of the string that were matched. |
completion | String | The suggested query completion |
href | String (URI) | A hyperlink to Autosuggest query with completed term. |
type | String | All Autosuggest query completion results have type 'urn:nlp-types:autosuggest' |
resultType | String | The type of Autosuggest result item which is 'query' for query completions |
Suggested Search
A link to a a search applying filters.
Attribute | Type | Description |
---|---|---|
title | String | A title for this search to be displayed to the user |
highlightedTitle | String | The same content as the 'title' field. However, it contains markup highlighting the parts of the string that were matched. |
category | String; optional | A category associated with this search. |
position | Array[Number]; optional | A position that is associated with the suggested search. |
bbox | Array[Number]; optional | A bounding box that is associated with the suggested search. |
href | String (URI) | A hyperlink to the search suggested (e.g. category search). |
type | String | All Autosuggest query results have type 'urn:nlp-types:search' |
resultType | String | The type of Autosuggest result item which is 'category' for categories, 'chain' for chains and 'query' for other search types. |
distance | Number (integer); optional | Distance to the suggested search in meters calculated as described in Search Location and Distance Calculation. |