open class Segment : Serializable
Describes a recognized entity of the Autocomplete Search result.
Segment()
Empty constructor for the Segment(type: SegmentType!, value: String!, matches: Matches!, id: String!, matchedAlternativeName: String!)
Default constructor for the |
var id: String!
Provided for the category segment type. Can be used to restrict the results of other search endpoints to the Points Of Interest (POI) of specific categories. See the categorySet parameter in the Search service documentation, e.g., the Fuzzy Search endpoint. |
|
var matchedAlternativeName: String!
Optionally provided for the category segment type. Present only if a part of the user query matched to the alternative name instead of a primary name. For example, for the input query "petrol station" the category segment value will be "gas station" and the matchedAlternativeName will be "petrol station". |
|
var matches: Matches!
Defines a mapping between the inputQuery and segment. |
|
var type: SegmentType!
The type of a detected entity. Currently we can detect: category, brand, plaintext. More types can appear in the future. |
|
var value: String!
The value of the detected entity. It may be a category name, brand name, or a part of unrecognized text. For the brand segment type, the value of this field can be used to restrict results of other search endpoints to the Points Of Interest (POI) of specific brands. See the brandSet parameter in the Search service documentation, e.g., the Fuzzy Search endpoint. |
open fun getId(): String!
Returns a provided ID for the category segment type. Can be used to restrict the results of other search endpoints to the Points Of Interest (POI) of specific categories. See the categorySet parameter in the Search service documentation, e.g., the Fuzzy Search endpoint. |
|
open fun getMatchedAlternativeName(): String!
Optionally provided for the category segment type. Present only if a part of the user query matched to the alternative name instead of a primary name. For example, for the input query "petrol station" the category segment value will be "gas station" and the matchedAlternativeName will be "petrol station". Returns a matched alternative name optionally provided for the category segment type. |
|
open fun getMatches(): Matches!
Returns a mapping between the inputQuery and segment. |
|
open fun getType(): SegmentType!
The type of a detected entity. Currently we can detect: category, brand, plaintext. More types can appear in the future. |
|
open fun getValue(): String!
The value of the detected entity. It may be a category name, brand name, or a part of unrecognized text. For the brand segment type, the value of this field can be used to restrict results of other search endpoints to the Points Of Interest (POI) of specific brands. See the brandSet parameter in the Search service documentation, e.g., the Fuzzy Search endpoint. |
|
open fun toString(): String |