IndexingSearchServicesSearch Method
|
Searches in pages that match any of the given keywords, with given field name and schema name criterias
Namespace: IngeniuxCMServiceAssembly: IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.6.492
Syntaxpublic XHRServiceResponseGeneric<SearchResultModel> Search(
string keywords,
string fieldName,
string schemaName,
bool fieldIsAttribute,
bool useCheckedOutContent,
bool includeVersions,
bool includeRecyled,
bool includePages = true,
bool includeAssets = true
)
Public Function Search (
keywords As String,
fieldName As String,
schemaName As String,
fieldIsAttribute As Boolean,
useCheckedOutContent As Boolean,
includeVersions As Boolean,
includeRecyled As Boolean,
Optional includePages As Boolean = true,
Optional includeAssets As Boolean = true
) As XHRServiceResponseGeneric(Of SearchResultModel)
public:
virtual XHRServiceResponseGeneric<SearchResultModel^>^ Search(
String^ keywords,
String^ fieldName,
String^ schemaName,
bool fieldIsAttribute,
bool useCheckedOutContent,
bool includeVersions,
bool includeRecyled,
bool includePages = true,
bool includeAssets = true
) sealed
abstract Search :
keywords : string *
fieldName : string *
schemaName : string *
fieldIsAttribute : bool *
useCheckedOutContent : bool *
includeVersions : bool *
includeRecyled : bool *
?includePages : bool *
?includeAssets : bool
(* Defaults:
let _includePages = defaultArg includePages true
let _includeAssets = defaultArg includeAssets true
*)
-> XHRServiceResponseGeneric<SearchResultModel>
override Search :
keywords : string *
fieldName : string *
schemaName : string *
fieldIsAttribute : bool *
useCheckedOutContent : bool *
includeVersions : bool *
includeRecyled : bool *
?includePages : bool *
?includeAssets : bool
(* Defaults:
let _includePages = defaultArg includePages true
let _includeAssets = defaultArg includeAssets true
*)
-> XHRServiceResponseGeneric<SearchResultModel> Parameters
- keywords String
- The keywords to search for. Please note that pages with matches of any of the keywords will be returned
- fieldName String
Narrow down which field to search for on the page
RemarksWhen left empty, search in all page fields
- schemaName String
Narrow down on the schema Root name that page was based on. Only pages with given root name will be search.
RemarksWhen left empty, search all pages
- fieldIsAttribute Boolean
- Specifies the given field is an element or attribute. Only applies when fieldName is specified.
- useCheckedOutContent Boolean
- Specifies whether to include page check out content in search. Page check out content will be separate entries.
- includeVersions Boolean
- Specifies whether to include previous version of the pages in search.
- includeRecyled Boolean
- Specifies whether to allow pages in recycle folder to be included in search.
- includePages Boolean (Optional)
- Specifies whether to include assets in search result
- includeAssets Boolean (Optional)
- Specifies whether to include pages in search result
Return Value
XHRServiceResponseGenericSearchResultModelCollection of page summaries that matches the given criterias.
Example
Sample JSON return
{
"code": 0,
"error": null,
"message": {
"MaxScore": 5,
"Results": [{
"AssignedUserOrGroup": "U|INGENIUX\\awang",
"CheckedOut": true,
"ID": "x100",
"LastModifiedTime": "20140120T18:44:57",
"Name": "Default Dynamic Schemas Test",
"PageID": "x100",
"Rank": 4,
"Recycled": false,
"Version": 0
}, {
"AssignedUserOrGroup": "U|INGENIUX\\awang",
"CheckedOut": true,
"ID": "x87",
"LastModifiedTime": "20140121T22:50:04",
"Name": "Test",
"PageID": "x87",
"Rank": 4,
"Recycled": false,
"Version": 0
}]
}
}
See Also