FulltextSearchSearch Method (ConnectionId, SessionId, String, FulltextSearchCriteriaOptions, FulltextSearchSortOrder, Int32, FulltextSearchContainerListTypes, Boolean, String, Boolean, Int32, String, NullableInt32, FulltextSearchFulltextSearchMethod, FulltextSearchFulltextSearchOption, 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,
	Nullable<int> languageId,
	FulltextSearchFulltextSearchMethod method,
	FulltextSearchFulltextSearchOption searchOptions,
	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.
languageId
Type: SystemNullableInt32
The language to use. This must be one of the languages defined in the sys.fulltext_languages or null (Nothing in Visual Basic) or negative, to use the default fulltext language of the underlying fulltext index.
LanguageID Name
2052 Simplified Chinese
1028 Traditional Chinese
1030 Danish
1031 German
2057 British English
1033 English
3082 Spanish
1036 French
1040 Italian
1041 Japanese
1042 Korean
0 Neutral
1043 Dutch
1045 Polish
1046 Brazilian
2070 Portuguese
1049 Russian
1053 Swedish
1054 Thai
1055 Turkish
3076 Chinese (Hong Kong SAR, PRC)
5124 Chinese (Macau SAR)
4100 Chinese (Singapore)
Note Note
This parameter is used only when Content Studio uses SQL Server 2005 or later.
The languages Danish, Polish, Portuguese-Brazil, Portuguese-Portugal, Russian, and Turkish languages must be manually enabled for full-text indexing. For more information about how to enable these languages, see Knowledge Base article 908441 at Microsoft Help and Support.
method
Type: ContentStudio.Document.FulltextFulltextSearchFulltextSearchMethod
The search method to use, this value must be one of the members in the FulltextSearchFulltextSearchMethod enumeration. If Freetext is used Content Studio will not translate the criteria passed in.
Note Note
This parameter is used only when Content Studio uses SQL Server 2005 or later.
searchOptions
Type: ContentStudio.Document.FulltextFulltextSearchFulltextSearchOption
Specifies additional options for optimizing the search operation. This value must be a combination of one or more members of the members in the FulltextSearchFulltextSearchOption enumeration.
Note Note
This parameter is used only when Content Studio uses SQL Server 2005 or later.
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. The value 10 will be used if a value less 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.
Remarks

This method is new in Content Studio version 5.1.
See Also

Reference