Class SmartSearch
- Namespace
- Dynamicweb.Smart
Search
- Assembly
- Dynamicweb.Core.dll
Represents smart search definition
- Inheritance
-
Smart
Search
- Inherited Members
Constructors
SmartSearch(string)
Initializes a new instance of an object.
Parameters
dataProviderTypeName
string
Properties
Configuration
Gets or sets the path to the configuration file.
Property Value
CountPreCalculate
Property Value
Created
Gets or sets the created date of the smart search.
Property Value
DataProviderTypeName
Gets the name of the data provider type name.
Property Value
DataProviderXmlParams
Gets or sets the params of data provider.
Property Value
ID
Gets or sets the unique ID of the smart search.
Property Value
Index
Get or sets a string containing the information about the index.
Property Value
IsHidden
Gets or sets visibility on the base smart search list.
Property Value
IsResultsLimit
Returns is results has limitations
Property Value
Name
Gets or sets the name of the smart search.
Property Value
PrimarySort
Gets or sets the primary sort results information.
Property Value
ResultsLimit
Results limit count
Property Value
RuleGroups
Gets or sets the rules groups
Property Value
SecondarySort
Gets or sets the secondary sort results information.
Property Value
UserID
Gets or sets the user id.
Property Value
ViewFields
Gets Or sets view fields
Property Value
ViewLanguages
Gets Or sets view languages
Property Value
Methods
Delete()
Deletes the current object.
Deserialize(XmlDocument)
Reads the object data from the given XML document and applies the information to the current instance.
Parameters
document
XmlDocument XML document containing an information about the object.
Returns
- bool
Value indicating whether information has been successfully retrieved from the XML document.
DeserializeSortInfo(XmlNode)
Deserializes the sort info.
Parameters
DataNode
XmlNode The data node.
Returns
DeserializeViewFields(XmlNode)
Deserializes the sort info.
Parameters
DataNode
XmlNode The data node.
Returns
DeserializeViewLanguages(XmlNode)
Deserializes the sort info.
Parameters
DataNode
XmlNode The data node.
Returns
GetAllSmartSearches(bool, int)
Gets all smart searches.
Parameters
Returns
GetCount()
Execute smart search filter and get count
Returns
GetPreviewDescriptionText()
Gets the preview description text.
Returns
GetPreviewResult()
Gets the preview result.
Returns
GetResult<T>()
Execute smart search and gets the result.
Returns
- T
Type Parameters
T
GetResult<T>(params SmartSearchSortInfo[])
Parameters
SortParams
SmartSearch []Sort Info
Returns
- T
Type Parameters
T
GetSmartSearchesByDataProvider(string, bool, int)
Gets the smart searches by data provider.
public static SmartSearchCollection GetSmartSearchesByDataProvider(string DataProviderName, bool Hidden = false, int UserID = -1)
Parameters
DataProviderName
stringName of the data provider.
Hidden
boolif set to
true
get hidden smart searches.UserID
intThe user ID.
Returns
Load(Guid)
Loads data from the current ID row.
Parameters
id
GuidID of the current row.
Returns
Save()
Saves current data to the smart search file.
Returns
Remarks
Return false if file with this name exist
Save(string)
Saves current data to the smart search file.
Parameters
path
stringThe path where the smart search file should be saved relative to the Smart search folder
Returns
Serialize()
Serializes smart search instance.
Returns
SerializeSortInfo(ref XmlElement, ref XmlDocument, params SmartSearchSortInfo[])
Serializes the sort info.
protected void SerializeSortInfo(ref XmlElement appendTo, ref XmlDocument doc, params SmartSearchSortInfo[] SortParams)
Parameters
appendTo
XmlElement The append to.
doc
XmlDocument The doc.
SortParams
SmartSearch []Sort Info The sort params.
SerializeViewFields(ref XmlElement, ref XmlDocument, ref IEnumerable<ViewField>)
Serializes the view fields.
protected void SerializeViewFields(ref XmlElement appendTo, ref XmlDocument doc, ref IEnumerable<ViewField> ViewFields)
Parameters
appendTo
XmlElement The append to.
doc
XmlDocument The doc.
ViewFields
IEnumerable<ViewField >The view fields.
SerializeViewLanguages(ref XmlElement, ref XmlDocument, ref IEnumerable<Language>)
Serializes the view fields.
protected static void SerializeViewLanguages(ref XmlElement appendTo, ref XmlDocument doc, ref IEnumerable<Language> ViewLanguages)
Parameters
appendTo
XmlElement The append to.
doc
XmlDocument The doc.
ViewLanguages
IEnumerable<Language>The view languages.