Click or drag to resize

IndexingSearchServicesSearch Method


Searches in pages that match any of the given keywords, with given field name and schema name criterias

Namespace: IngeniuxCMService
Assembly: IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.6.492
Syntax
public XHRServiceResponseGeneric<SearchResultModel> Search(
	string keywords,
	string fieldName,
	string schemaName,
	bool fieldIsAttribute,
	bool useCheckedOutContent,
	bool includeVersions,
	bool includeRecyled,
	bool includePages = true,
	bool includeAssets = true
)

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

Remarks
When 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.

Remarks
When 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

XHRServiceResponseGenericSearchResultModel

Collection of page summaries that matches the given criterias.

Example
Sample JSON return
JavaScript
 {
    "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