Enables scripted content fragments to use Search
Properties
Name | Access | Type | Description |
---|---|---|---|
SearchFlags | Read | ISearchFlags | Search Flags |
Methods
Create
Create Overload 1
Velocity
#set($searchResultResponse = $core_v2_searchResult.Create($content, $contentId, $contentType, $contentUrl, $date, $roles, $title))
JavaScript
var searchResultResponse = core_v2_searchResult.Create(content, contentId, contentType, contentUrl, date, roles, title);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
content | String | Content | Required | ||
contentId | String | Content Id | Required | ||
contentType | String | Content Type | Required | ||
contentUrl | String | Content Url | Required | ||
date | DateTime | Date | Required | ||
roles | String | Roles | Required | ||
title | String | Title | Required |
Create Overload 2
Velocity
#set($searchResultResponse = $core_v2_searchResult.Create($content, $contentId, $contentType, $contentUrl, $date, $roles, $title, "%{ Collapse = $collapseArg, CreatedBy = $createdByArg, CustomFields = $customFieldsArg, EditedBy = $editedByArg, GroupId = $groupIdArg, Rating = $ratingArg, SectionId = $sectionIdArg, Tags = $tagsArg, ThreadId = $threadIdArg, UserId = $userIdArg, Username = $usernameArg, WikiId = $wikiIdArg }"))
JavaScript
var searchResultResponse = core_v2_searchResult.Create(content, contentId, contentType, contentUrl, date, roles, title, { Collapse: collapseArg, CreatedBy: createdByArg, CustomFields: customFieldsArg, EditedBy: editedByArg, GroupId: groupIdArg, Rating: ratingArg, SectionId: sectionIdArg, Tags: tagsArg, ThreadId: threadIdArg, UserId: userIdArg, Username: usernameArg, WikiId: wikiIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
content | String | Content | Required | ||
contentId | String | Content Id | Required | ||
contentType | String | Content Type | Required | ||
contentUrl | String | Content Url | Required | ||
date | DateTime | Date | Required | ||
roles | String | Roles | Required | ||
title | String | Title | Required | ||
Collapse | Boolean | Collapse | Optional | ||
CreatedBy | String | Created By | Optional | ||
CustomFields | List of SearchField | Custom Fields | Optional | ||
EditedBy | String | Edited By | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
Rating | Double | Rating | Optional | ||
SectionId | Int32 | Section Id | Optional | ||
Tags | String | Tags | Optional | ||
ThreadId | Int32 | Thread Id | Optional | ||
UserId | Int32 | User Id | Optional | ||
Username | String | Username | Optional | ||
WikiId | Int32 | Wiki Id | Optional |
Returns
Delete
Velocity
#set($additionalInfoResponse = $core_v2_searchResult.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_searchResult.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required |
Returns
Get
Get a SearchResult by Id
Velocity
#set($searchResultResponse = $core_v2_searchResult.Get($id))
JavaScript
var searchResultResponse = core_v2_searchResult.Get(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required |
Returns
GetRelatedContent
GetRelatedContent Overload 1
Searches for related content
Velocity
#set($searchResultsResponse = $core_v2_searchResult.GetRelatedContent($searchUniqueId))
JavaScript
var searchResultsResponse = core_v2_searchResult.GetRelatedContent(searchUniqueId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
searchUniqueId | String | An entity's unique search id, available as a property of entities | Required |
GetRelatedContent Overload 2
Searches for related content
Velocity
#set($searchResultsResponse = $core_v2_searchResult.GetRelatedContent($searchUniqueId, "%{ Filters = $filtersArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, Sort = $sortArg }"))
JavaScript
var searchResultsResponse = core_v2_searchResult.GetRelatedContent(searchUniqueId, { Filters: filtersArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, Sort: sortArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
searchUniqueId | String | An entity's unique search id, available as a property of entities | Required | ||
Filters | String | Filters. | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
Sort | String | Sort | Optional | date, date asc, date desc, titlesort, titlesort asc, titlesort desc |
Returns
IsSearchable
Velocity
#set($booleanResponse = $core_v2_searchResult.IsSearchable($contentTypeId))
JavaScript
var booleanResponse = core_v2_searchResult.IsSearchable(contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content Type Id | Required |
Returns
Boolean
List
Perform a search with query parameters.
Velocity
#set($searchResultsResponse = $core_v2_searchResult.List("%{ ApplicationId = $applicationIdArg, Collapse = $collapseArg, ContainerId = $containerIdArg, DateRangeFacets = $dateRangeFacetsArg, DateRangeFilters = $dateRangeFiltersArg, EndDate = $endDateArg, FieldFacets = $fieldFacetsArg, FieldFilters = $fieldFiltersArg, Filters = $filtersArg, IsApplication = $isApplicationArg, IsContainer = $isContainerArg, IsContent = $isContentArg, IsLoggable = $isLoggableArg, LogicalllyOrTags = $logicalllyOrTagsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, Query = $queryArg, SearchFlags = $searchFlagsArg, Sort = $sortArg, StartDate = $startDateArg, Tags = $tagsArg }"))
JavaScript
var searchResultsResponse = core_v2_searchResult.List({ ApplicationId: applicationIdArg, Collapse: collapseArg, ContainerId: containerIdArg, DateRangeFacets: dateRangeFacetsArg, DateRangeFilters: dateRangeFiltersArg, EndDate: endDateArg, FieldFacets: fieldFacetsArg, FieldFilters: fieldFiltersArg, Filters: filtersArg, IsApplication: isApplicationArg, IsContainer: isContainerArg, IsContent: isContentArg, IsLoggable: isLoggableArg, LogicalllyOrTags: logicalllyOrTagsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, Query: queryArg, SearchFlags: searchFlagsArg, Sort: sortArg, StartDate: startDateArg, Tags: tagsArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ApplicationId | Guid | Application Id | Optional | ||
Collapse | Boolean | Collapse | Optional | False | |
ContainerId | Guid | Container Id | Optional | ||
DateRangeFacets | String | Date Range Facets. | Optional | ||
DateRangeFilters | String | Date Range Filters. | Optional | ||
EndDate | DateTime | End Date | Optional | ||
FieldFacets | String | Field Facets. | Optional | ||
FieldFilters | String | Field Filters. | Optional | ||
Filters | String | Filters is not required but you should use either Query or Filters otherwise you'll get all documents in the search index. | Optional | ||
IsApplication | Boolean | Is Application | Optional | ||
IsContainer | Boolean | Is Container | Optional | ||
IsContent | Boolean | Is Content | Optional | ||
IsLoggable | Boolean | Whether the search should be logged for reporting. | Optional | ||
LogicalllyOrTags | Boolean | Whether to AND or OR tags specified in the Tags parameter. Default is False, logically AND tags. | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
Query | String | Query is not required but you should use either Query or Filters otherwise you'll get all documents in the search index. | Optional | ||
SearchFlags | String | Comma delimited list of search flags, used for flagging the search as well as for reporting. | Optional | ||
Sort | String | Sort | Optional | date, date asc, date desc, titlesort, titlesort asc, titlesort desc | |
StartDate | DateTime | Start Date | Optional | ||
Tags | String | Comma delimited list of tags. | Optional |
Returns
Update
Velocity
#set($searchResultResponse = $core_v2_searchResult.Update($id, "%{ Collapse = $collapseArg, Content = $contentArg, ContentId = $contentIdArg, ContentType = $contentTypeArg, ContentUrl = $contentUrlArg, CreatedBy = $createdByArg, CustomFields = $customFieldsArg, Date = $dateArg, EditedBy = $editedByArg, GroupId = $groupIdArg, Rating = $ratingArg, Roles = $rolesArg, SectionId = $sectionIdArg, Tags = $tagsArg, ThreadId = $threadIdArg, Title = $titleArg, UserId = $userIdArg, Username = $usernameArg, WikiId = $wikiIdArg }"))
JavaScript
var searchResultResponse = core_v2_searchResult.Update(id, { Collapse: collapseArg, Content: contentArg, ContentId: contentIdArg, ContentType: contentTypeArg, ContentUrl: contentUrlArg, CreatedBy: createdByArg, CustomFields: customFieldsArg, Date: dateArg, EditedBy: editedByArg, GroupId: groupIdArg, Rating: ratingArg, Roles: rolesArg, SectionId: sectionIdArg, Tags: tagsArg, ThreadId: threadIdArg, Title: titleArg, UserId: userIdArg, Username: usernameArg, WikiId: wikiIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | String | Id | Required | ||
Collapse | Boolean | Collapse | Optional | ||
Content | String | Content | Optional | ||
ContentId | String | Content Id | Optional | ||
ContentType | String | Content Type | Optional | ||
ContentUrl | String | Content Url | Optional | ||
CreatedBy | String | Created By | Optional | ||
CustomFields | List of SearchField | Custom Fields | Optional | ||
Date | DateTime | Date | Optional | ||
EditedBy | String | Edited By | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
Rating | Double | Rating | Optional | ||
Roles | String | Roles | Optional | ||
SectionId | Int32 | Section Id | Optional | ||
Tags | String | Tags | Optional | ||
ThreadId | Int32 | Thread Id | Optional | ||
Title | String | Title | Optional | ||
UserId | Int32 | User Id | Optional | ||
Username | String | Username | Optional | ||
WikiId | Int32 | Wiki Id | Optional |