FulltextSearchSearch Method (ConnectionId, SessionId, String, FulltextSearchCriteriaOptions, FulltextSearchSortOrder, Int32, FulltextSearchContainerListTypes, Boolean, String, Boolean, Int32, String, Int32, Int32, Int32, Int32) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Performs a fulltext search against the Content Studio fulltext index.

Namespace: ContentStudio.Document.Fulltext
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string Search(
	ConnectionId connectionId,
	SessionId sessionId,
	string criteria,
	FulltextSearchCriteriaOptions criteriaOption,
	FulltextSearchSortOrder sorting,
	int[] containerList,
	FulltextSearchContainerListTypes listType,
	bool useExtendSearchResult,
	string extendedSearchResultClassName,
	bool noMark,
	int maxReturnSize,
	string[] extendedSearchResultXMLFields,
	int pageNumber,
	int pageSize,
	out int pageCount,
	out int recordCount
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
criteria
Type: SystemString
The phrase used as full text input. This parameter cannot exceed MAX_CRITERIA_SIZE characters in length.
criteriaOption
Type: ContentStudio.Document.FulltextFulltextSearchCriteriaOptions
Defines how Content Studio should treat the passed in search criteria.
sorting
Type: ContentStudio.Document.FulltextFulltextSearchSortOrder
Defines how Content Studio should sort the returned data.
containerList
Type: SystemInt32
A list of id:s of container to search in.
listType
Type: ContentStudio.Document.FulltextFulltextSearchContainerListTypes
Defines the type of container that indicated by the containerList parameter. If this parameter is Unit and the containerList is an empty array, all units are searched. If this parameter is Category and the containerList is empty an error occurs.
useExtendSearchResult
Type: SystemBoolean
Set to true to invoke extended search result. Setting this parameter to true while the extended search result functionality is missing from the system will generate an error.
extendedSearchResultClassName
Type: SystemString
A defined CSS class name to use this for highlighted search words. (<span class='ClassName'>). This class name is not HTML encoded by this procedure and blank or missing will mark highlighted search words as being bold (<b>). If NoMark is false and this parameter is null or empty no text highlighting is made. This parameter is ignored if the extended search result functionality is missing from the system.
noMark
Type: SystemBoolean
Set to true to avoid marking search words (ExtendedSearchResultClassName is ignored). This parameter is ignored if the extended search result functionality is missing from the system.
maxReturnSize
Type: SystemInt32
Set to a numeric value greater than 10 to limit the size of the returned result. Values below 10 or non-numeric values defaults to 200 characters. This parameter is ignored if the extended search result functionality is missing from the system.
extendedSearchResultXMLFields
Type: SystemString
An array of xml field names that will be combined into the extended search result content excerpt.
pageNumber
Type: SystemInt32
The page number to read. A default value of 1 will be used if a value lower than 1 is supplied.
pageSize
Type: SystemInt32
The size of the pages to read. A default value of 10 will be used if a value lower than 1 is supplied.
pageCount
Type: SystemInt32
When the method returns the total pages of data found. This parameter is passed uninitialized.
recordCount
Type: SystemInt32
When the method returns contains the total entries found. This parameter is passed uninitialized.

Return Value

Type: String
Xml
<root>
  <status>0</status>
  <statustext>Success</statustext>
  <pageno>1</pageno>
  <pagesize>10</pagesize>
  <pagecount>2</pagecount>
  <recordcount>17</recordcount>
  <searchresult>
    <row rowid="R1" 
         documentid="10023" 
         documentname="Mydocument" 
         createddate="2006-10-12T00:00" 
         modifieddate="2006-10-12T00:00" 
         rank="98" logicalpath="TheUnit/Thecategory/Mydocument" 
         categoryid="149" 
         categoryname="Thecategory" 
         modulename="xmldocument" 
         introduction="Text of the document" />
    <!-- more rows can follow -->
  </searchresult>
</root>
Exceptions

ExceptionCondition
ArgumentExceptionExtended search result functionality is not installed and the parameter UseExtendSearchResult was true.
ApplicationExceptionAn error occurred in the scan text module that compiles the extended search result excerpt. This error is logged.
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

During the search operation an access check is made so that only documents that the caller can browse is returned.
See Also

Reference