Class BaseLuceneSearcher
Simple abstract class containing basic properties for Lucene searchers
- Inheritance
-
Base
Lucene Searcher
- Implements
- Derived
- Inherited Members
Constructors
BaseLuceneSearcher(string, Analyzer)
Constructor to allow for creating an indexer at runtime
Parameters
name
stringanalyzer
Analyzer
BaseLuceneSearcher(string, Analyzer, FacetsConfig)
Constructor to allow for creating an indexer at runtime
Parameters
name
stringanalyzer
AnalyzerfacetsConfig
FacetsConfig
Properties
LuceneAnalyzer
The analyzer to use for query parsing, by default, this is set to StandardAnalyzer
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
BooleanOperation The default operation.
Returns
- IQuery
An instance of IQuery
Executor
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
BooleanOperation The default operation.
luceneAnalyzer
AnalyzersearchOptions
LuceneSearch Options
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
Parameters
disposing
bool
GetDefaultFacetConfig()
Gets a FacetConfig with default configuration
Returns
- Facets
Config Facet Config
GetSearchContext()
Gets the seach context
Returns
Search(string, QueryOptions?)
Searches the index
Parameters
searchText
stringThe search text or a native query
options
QueryOptions
Returns
- ISearch
Results Search Results