Click or drag to resize
SearchHelper Class
Provides the smart search methods.
Inheritance Hierarchy
SystemObject
  CMS.SearchSearchHelper

Namespace: CMS.Search
Assembly: CMS.Search (in CMS.Search.dll) Version: 8.2.23
Syntax
C#
public static class SearchHelper

The SearchHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddGeneralField
Adds a general field do the search document.
Public methodStatic memberAddObjectDataToDocument
Adds object data to iDocument, data for content field prepares and returns.
Public methodStatic memberCleanSearchSettings
Cleans the search settings from settings which does not correspond to any fields in the class and returns the filtered definition.
Public methodStatic memberCreateDocument
Creates search document based on given parameters
Public methodStatic memberCreateEmptyDocument
Creates empty search document.
Public methodStatic memberCreateRebuildTask
Creates rebuild task if search settings are not empty, for user index is task created always.
Public methodStatic memberCreateSearchSettings(String, Boolean, Boolean, Boolean, String)
Creates new SearchSettingsInfo with given parameters.
Public methodStatic memberCreateSearchSettings(String, Boolean, Boolean, Boolean, String, SearchSettingsInfo, Boolean)
Creates new SearchSettingsInfo with given parameters. Returns whether the parameters changed from the original search settings.
Public methodStatic memberDelete(String, ICollection, SearchIndexInfo)
Remove document(s) with dependence on field name and field value collection for specified index.
Public methodStatic memberDelete(String, String, SearchIndexInfo)
Remove document(s) with dependence on field name and field value for specified index.
Public methodStatic memberFilterResults
Filters the search results, returns number of resulting items
Public methodStatic memberFinishRebuild
Finishes the rebuild of the given index by marking it as updated
Public methodStatic memberGetBinaryDataSearchContent
Extracts the search information from the info. Returns null by default. Should be overriden by specific info.
Public methodStatic memberGetClassSearchFields(Int32)
Returns list of all fields of the given class (along with their types) which should be included in the search.
Public methodStatic memberGetClassSearchFields(String)
Returns list of all fields of the given class (along with their types) which should be included in the search.
Public methodStatic memberGetClassSearchFields(DataClassInfo)
Returns list of all fields of the given class (along with their types) which should be included in the search.
Public methodStatic memberGetCustomSearchIndex
Returns ICusromSearchIndex for specified index info.
Public methodStatic memberGetDefaultSearchSettings(String)
Returns the default search settings of the class.
Public methodStatic memberGetDefaultSearchSettings(DataClassInfo)
Returns the default search settings of the class.
Public methodStatic memberGetResultsToProcess
Processes the results from the given range matching the required type
Public methodStatic memberGetResultTypes
Gets the list of all types present in the given results
Public methodStatic memberGetSearchFieldDefaultValue
Gets value which should be preselected for given column.
Public methodStatic memberGetStopWordsFileInfo
Returns FileInfo object of stop words file for the given path
Public methodStatic memberHighlight
Highlight input text with dependence on current search key words.
Public methodStatic memberInitDocument
Initializes search document.
Public methodStatic memberInvalidateSearcher
Invalidates searcher for the given index.
Public methodStatic memberIsClassSearchEnabled
Returns true if given class allows search.
Public methodStatic memberIsSearchAllowedExtension
Check if file extension is allowed for indexing such attachment in search index.
Public methodStatic memberIsSearchTaskCreationAllowed
Returns true if the search task for given node should be created. Returns true if - search is allowed on general level AND - search is allowed for class of the object
Public methodStatic memberLoadCustomAnalyzerTAnalyzerType
Returns analyzer object for specified analyzer name.
Public methodStatic memberOptimize
Optimize specified index.
Public methodStatic memberPartialRebuild
Rebuild part of the index with dependence on type and values.
Public methodStatic memberPrepareContentValue
Prepares value to add to content field.
Public methodStatic memberRebuild
Rebuild specified index.
Public methodStatic memberSearch
Returns dataset with search results, if search is used for non-document index, path and class name values are ignored (can be null).
Public methodStatic memberSearchEnabledForClass
Returns true if search is enabled for a given class (document type). Returns false if class not found.
Public methodStatic memberSearchFieldChanged
Returns true if any field included in the search changed (checks fields defined in Class Search Settings).
Public methodStatic memberSetDefaultClassSearchColumns
Sets default class search columns.
Public methodStatic memberUpdate
Insert or update document for specified index.
Top
Fields
  NameDescription
Public fieldStatic memberCUSTOM_INDEX_DATA
Constant for custom index data.
Public fieldStatic memberCUSTOM_SEARCH_INDEX
Constant for custom search index.
Public fieldStatic memberDEFAULT_SEARCH_CONTENT_COLUMN
Constant for default class search content column.
Public fieldStatic memberDEFAULT_SEARCH_CREATION_DATE_COLUMN
Constant for default class search creation date column.
Public fieldStatic memberDEFAULT_SEARCH_TITLE_COLUMN
Constant for default class search title column.
Public fieldStatic memberDOCUMENTS_CRAWLER_INDEX
Constant for custom search index.
Public fieldStatic memberGENERALINDEX
General search index constant.
Public fieldStatic memberINVARIANT_FIELD_VALUE
Invariant field value.
Public fieldStatic memberMAX_INDEX_PATH
Max allowed length of path for place where indexes are stored. 260 is Windows limit, -1 for NULL, -16 for index file name, -1 for index name, -1 for slash
Public fieldStatic memberONLINEFORMINDEX
On-line forms search index constant.
Public fieldStatic memberSIMPLE_ITEM_ID
Guid value of the simple search setting item.
Public fieldStatic memberSynonymsWeight
Gets the weight (from interval 0 - 1.0f) which is given to synonyms if the synonym expansion is used. 1.0f means the synonyms are equally important as original words.
Top
Properties
  NameDescription
Public propertyStatic memberBasicSearchReplacer
Gets the regular expression for basic search replacement.
Public propertyStatic memberCustomSearchPath
Custom search path.
Public propertyStatic memberExcludedFieldsFromConversion
Gets or sets the fields separated by semicolon, this field will be excluded from int/double conversion
Public propertyStatic memberImageContentReplacer
Gets the regular expression for image content tag.
Public propertyStatic memberMaxAttachmentSize
Gets the maximum size of an attachment (in kB) which are processed with content extractors. 0 means unlimited size (default). If a positive number is set, attachments the size of which exceeds the value are not processed and their content is not indexed.
Public propertyStatic memberMaxFieldLength
Maximal field length.
Public propertyStatic memberMaxResults
Gets the value that indicates whether diacritics should be removed for index field
Public propertyStatic memberRemoveDiacriticsForIndexField
Gets the value that indicates whether diacritics should be removed for index field
Public propertyStatic memberSearchContentXpathValue
XPath function to specify which web parts fields should be added to the search document content.
Public propertyStatic memberSearchers
Collection of index Searchers. [key -> IndexSearcher]
Public propertyStatic memberSearchOnlyWhenContentPresent
If true, performs the search only when the content part of the search expression is present.
Public propertyStatic memberSearchPath
Search path. File system location where Smart Search stores the indexes.
Public propertyStatic memberStoreContentField
Gets the value that indicates whether content field should be stored in the index
Public propertyStatic memberSubsetAnalyzerWordRegex
Gets the regular expression for word splitting used in SubsetAnalyzer.
Top
See Also