SearchMetaData Class
Metadata passed with search requests. Two forms of construction are allowed depending on the number and types of the parameters:
- with locale and form factor or
- with cardinality, locale, and form factor.
Item Index
Methods
aggregated_keywords
()
Array of String
Get the list of scope keywords used to initiate this search request.
Returns:
The list of scope keywords used to initiate this search request.
cardinality
()
Int
Get cardinality.
Returns:
contains_hint
-
key
Check if this SearchMetadata has a hint.
Parameters:
-
key
StringThe hint name.
Returns:
True if the hint is set.
form_factor
()
Get the form factor string.
Returns:
The form factor string
get
-
key
Get the value of an attribute
Parameters:
-
key
String
Returns:
, {Number} or {Object}
has_location
()
Boolean
Does the SearchMetadata have a location.
Returns:
True if there is a location property.
hints
()
Dictionary
Get all hints.
Returns:
internet_connectivity
()
ConnectivityStatus
Get internet connectivity status.
Returns:
The internet connectivity status.
is_aggregated
()
Boolean
Check if this search request originated from an aggregator scope.
Returns:
True if this search request originated from an aggregator scope.
locale
()
Get the locale string.
Returns:
The locale string
location
()
Location
Get location.
Returns:
data representing the current location, including attributes such as city and country.
remove_location
()
Remove location data entirely. This method does nothing if no location data is present.
set
-
key
-
value
Set the value of an attribute
Parameters:
-
key
String -
value
String, {Number} or {Object}
set_aggregated_keywords
-
aggregated_keywords
Set the list of scope keywords used to initiate this search request.
Parameters:
-
aggregated_keywords
Array of StringThe list of scope keywords used to initiate this search request.
set_cardinality
-
cardinality
Set cardinality.
Parameters:
-
cardinality
Int
set_hint
-
key
-
value
Sets a hint.
Parameters:
-
key
StringThe name of the hint.
-
value
ObjectHint value
set_internet_connectivity
-
The
Set internet connectivity status.
Parameters:
-
The
ConnectivityStatusinternet connectivity status.
set_location
-
location
Set location.
Parameters:
-
location
Locationdata