Class BaseLuceneSearcher
Simple abstract class containing basic properties for Lucene searchers
public abstract class BaseLuceneSearcher : BaseSearchProvider, ISearcher, IDisposable
- Inheritance
-
BaseLuceneSearcher
- Implements
- Derived
- Inherited Members
Constructors
BaseLuceneSearcher(string, Analyzer)
Constructor to allow for creating an indexer at runtime
[Obsolete("To remove in Examine V5")]
protected BaseLuceneSearcher(string name, Analyzer analyzer)
Parameters
namestringanalyzerAnalyzer
BaseLuceneSearcher(string, Analyzer, FacetsConfig)
Constructor to allow for creating an indexer at runtime
protected BaseLuceneSearcher(string name, Analyzer analyzer, FacetsConfig facetsConfig)
Parameters
namestringanalyzerAnalyzerfacetsConfigFacetsConfig
Properties
LuceneAnalyzer
The analyzer to use for query parsing, by default, this is set to StandardAnalyzer
public Analyzer LuceneAnalyzer { get; }
Property Value
- Analyzer
Methods
CreateQuery(string?, BooleanOperation)
Creates a search criteria instance as required by the implementation
public override IQuery CreateQuery(string? category = null, BooleanOperation defaultOperation = BooleanOperation.And)
Parameters
categorystringThe type of data in the index.
defaultOperationBooleanOperationThe default operation.
Returns
- IQuery
An instance of IQueryExecutor
CreateQuery(string?, BooleanOperation, Analyzer, LuceneSearchOptions)
Creates an instance of SearchCriteria for the provider
public IQuery CreateQuery(string? category, BooleanOperation defaultOperation, Analyzer luceneAnalyzer, LuceneSearchOptions searchOptions)
Parameters
categorystringThe type of data in the index.
defaultOperationBooleanOperationThe default operation.
luceneAnalyzerAnalyzersearchOptionsLuceneSearchOptions
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
[Obsolete("The virutal modifier will be removed in Examine V5, override Dispose(bool) instead")]
public virtual void Dispose()
Dispose(bool)
Disposes of the searcher
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
GetDefaultFacetConfig()
Gets a FacetConfig with default configuration
[Obsolete("To remove in Examine V5")]
public virtual FacetsConfig GetDefaultFacetConfig()
Returns
- FacetsConfig
Facet Config
GetSearchContext()
Gets the seach context
public abstract ISearchContext GetSearchContext()
Returns
Search(string, QueryOptions?)
Searches the index
public override ISearchResults Search(string searchText, QueryOptions? options = null)
Parameters
searchTextstringThe search text or a native query
optionsQueryOptions
Returns
- ISearchResults
Search Results