SearchResult
Represents a given search result as native object
Constructor Summary
Public Constructor | ||
public |
constructor(category: SearchCategory, object: Object, result: Object) Represents search result |
Member Summary
Public Members | ||
public |
category: * |
|
public |
Unique foreign id for object |
|
public get |
Returns underlying value or object backing this result. |
Method Summary
Public Methods | ||
public |
highlightForKey(key: string): string Obtains the full highlight |
|
public |
highlightSnippetForKey(key: string, predicate: Function, type: string): DocumentFragment Obtains highlight snippet for key |
Public Constructors
public constructor(category: SearchCategory, object: Object, result: Object) source
Represents search result
Params:
Name | Type | Attribute | Description |
category | SearchCategory | A search category |
|
object | Object | Formatted object |
|
result | Object | the result object from algolia |
Public Members
public category: * source
Public Methods
public highlightForKey(key: string): string source
Obtains the full highlight
Params:
Name | Type | Attribute | Description |
key | string | Key of item eg |
Throw:
If key not found |