ogcItemToDiscussionPostResult
This method is responsible for converting an OGC item whose properties represent an IPost into an IHubSearchResult. Although some fields do not apply, this is being done such that result of a discussion post search can automatically be used in a gallery.
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
ogcItem Required | IOgcItem |
Returns
IHubSearchResult
Property | Type | Notes |
---|---|---|
AccessLevel |
Access level of the backing entity |
|
HubFamily |
Hub Family |
|
Inherited | Date |
Date the entity was created |
Inherited | string |
Source of the creation date as a property path
e.q |
Inherited | string |
Id of the entity as a string |
Inherited | string |
Name of the Entity For Entities backed by items, this is typically the title |
Inherited | string |
For Item backed results, this will be |
Inherited | Date |
Date when the entity was last updated Depending on the entity, this could be derived in many different ways |
Inherited | string |
Source of the updated date |
Optional | string[] |
Categories; Applies to Items |
Optional | IHubGeography | |
Optional | IHubLocation |
Custom location defined on the item properties (item.properties.location), typically created in details pane of entity workspace. |
Optional | string |
Owner; Applies to Items and Groups |
Optional | IItem | IGroup | IUser | IOgcItem | IChannel | IEvent | IRegistration |
Raw result object returned from the search. This allows downstream processing to access additional properties that may not be explicitly defined in this interface Note: We will need to cast to the approproate type in order to access the properties |
Optional | string[] |
Tags; Applies to Items |
Optional | string[] |
TypeKeywords; Applies to Items |
Optional Inherited | IHubEntityLinks |
Links to related things |
Optional Inherited | string |
Source of the entity. Exact logic for this tbd, but the intent is to allow the result to be attributed to something other than "owner" |
Optional Inherited | string |
Sanitized summary derived from item.snippet, item.description, group.description, user.description, event.description etc |
Function defined in common/src/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.ts:12