Class SearchProvider
Implements operations for the search provider. (Inherits System.Configuration.Provider.ProviderBase.)
Namespace: Mediachase.Search
Assembly: Mediachase.Search.dll
Version: 12.17.2Syntax
public abstract class SearchProvider : ProviderBase
Constructors
SearchProvider()
Declaration
protected SearchProvider()
Properties
QueryBuilderType
Gets the class type of the query builder. This class will be used to dynamically convert SearchCriteria to the query that Search Provider can understand.
Declaration
public abstract string QueryBuilderType { get; }
Property Value
Type | Description |
---|---|
System.String | The type of the query builder. |
Examples
// the following type will build query for the SOLR server "Mediachase.Search.Providers.Solr.SolrSearchQueryBuilder, Mediachase.Search.SolrSearchProvider"
Methods
Close(String, String)
Closes the specified provider.
Declaration
public abstract void Close(string applicationName, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
System.String | scope | The scope. |
Commit(String)
Commits changes made to this instance.
Declaration
public abstract void Commit(string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
Index(String, String, ISearchDocument)
Adds the document to the index. Depending on the provider, the document will be commited only after commit is called.
Declaration
public abstract void Index(string applicationName, string scope, ISearchDocument document)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
System.String | scope | The scope. |
ISearchDocument | document | The document. |
Remove(String, String, String, String)
Removes the document by specifying scope (core in SOLR), key (a field that can be used to lookup for a document) and value of the key.
Declaration
public abstract int Remove(string applicationName, string scope, string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
System.String | scope | The scope. |
System.String | key | The key. |
System.String | value | The value. |
Returns
Type | Description |
---|---|
System.Int32 |
RemoveAll(String, String)
Removes all documents in the specified scope.
Declaration
public abstract void RemoveAll(string applicationName, string scope)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
System.String | scope | The scope. |
Search(String, ISearchCriteria)
Searches the datasource using the specified criteria.
Declaration
public abstract ISearchResults Search(string applicationName, ISearchCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
System.String | applicationName | Name of the application. |
ISearchCriteria | criteria | The criteria. |
Returns
Type | Description |
---|---|
ISearchResults |