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
name
stringanalyzer
Analyzer
BaseLuceneSearcher(string, Analyzer, FacetsConfig)
Constructor to allow for creating an indexer at runtime
protected BaseLuceneSearcher(string name, Analyzer analyzer, FacetsConfig facetsConfig)
Parameters
name
stringanalyzer
AnalyzerfacetsConfig
FacetsConfig
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
category
stringThe type of data in the index.
defaultOperation
BooleanOperationThe 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
category
stringThe type of data in the index.
defaultOperation
BooleanOperationThe default operation.
luceneAnalyzer
AnalyzersearchOptions
LuceneSearchOptions
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
disposing
bool
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
searchText
stringThe search text or a native query
options
QueryOptions
Returns
- ISearchResults
Search Results