SaaS CMS has officially launched! Learn more now.

Class SearchResults

Concrete implementation for ISearchResults

Inheritance
System.Object
SearchResults
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Search.Extensions
Assembly: Mediachase.Search.Extensions.dll
Version: 11.8.3
Syntax
public class SearchResults : ISearchResults

Constructors

SearchResults(ISearchDocuments, ISearchCriteria)

Initializes a new instance of the SearchResults class.

Declaration
public SearchResults(ISearchDocuments documents, ISearchCriteria criteria)
Parameters
Type Name Description
ISearchDocuments documents

The documents.

ISearchCriteria criteria

The criteria.

Properties

Documents

Gets the documents that are contained within current results.

Declaration
public virtual ISearchDocuments Documents { get; set; }
Property Value
Type Description
ISearchDocuments

The documents.

FacetGroups

Gets the facet groups.

Declaration
public virtual ISearchFacetGroup[] FacetGroups { get; set; }
Property Value
Type Description
ISearchFacetGroup[]

The facet groups.

SearchCriteria

Gets the search criteria that was used to generate search results.

Declaration
public virtual ISearchCriteria SearchCriteria { get; }
Property Value
Type Description
ISearchCriteria

The search criteria.

Suggestions

Gets or sets the word suggestions.

Declaration
public virtual string[] Suggestions { get; set; }
Property Value
Type Description
System.String[]

The suggestions.

TotalCount

Gets the total count of all results that we can potentially return.

Declaration
public virtual int TotalCount { get; }
Property Value
Type Description
System.Int32

The total count.

Methods

GetFieldValue<T>(Int32, String)

Gets the field value converted to the type specified.

Declaration
public virtual T[] GetFieldValue<T>(int index, string fieldName)
Parameters
Type Name Description
System.Int32 index

The index.

System.String fieldName

Name of the field.

Returns
Type Description
T[]
Type Parameters
Name Description
T

GetKeyFieldValues<T>()

Gets the array of values from the key field defined in the ISearchCriteria.

Declaration
public virtual T[] GetKeyFieldValues<T>()
Returns
Type Description
T[]
Type Parameters
Name Description
T

Implements