Class BaseLuceneSearchProvider
Abstract Base Implementation of a Full Text Search Provider using Lucene.Net.
Inherited Members
Namespace: VDS.RDF.Query.FullText.Search.Lucene
Assembly: dotNetRdf.Query.FullText.dll
Syntax
public abstract class BaseLuceneSearchProvider : IFullTextSearchProvider, IDisposable, IConfigurationSerializable
Remarks
Derived Implementations may only need to call the base constructor as the LuceneSearchProvider does but if you've implemented custom indexing you may need to extend more of this class.
Constructors
| Edit this page View SourceBaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema)
Creates a new Base Lucene Search Provider.
Declaration
protected BaseLuceneSearchProvider(LuceneVersion ver, Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema)
Parameters
Type | Name | Description |
---|---|---|
LuceneVersion | ver | Lucene Version. |
Directory | indexDir | Directory. |
Analyzer | analyzer | Analyzer. |
IFullTextIndexSchema | schema | Index Schema. |
BaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema, bool)
Creates a new Base Lucene Search Provider.
Declaration
protected BaseLuceneSearchProvider(LuceneVersion ver, Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema, bool autoSync)
Parameters
Type | Name | Description |
---|---|---|
LuceneVersion | ver | Lucene Version. |
Directory | indexDir | Directory. |
Analyzer | analyzer | Analyzer. |
IFullTextIndexSchema | schema | Index Schema. |
bool | autoSync | Whether the Search Provider should stay in sync with the underlying index. |
Properties
| Edit this page View SourceIsAutoSynced
Gets whether this search provider is always seeing the latest state of the index.
Declaration
public bool IsAutoSynced { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceDispose()
Disposes of the Search Provider.
Declaration
public void Dispose()
DisposeInternal()
Virtual method that can be overridden to add implementation specific dispose logic.
Declaration
protected virtual void DisposeInternal()
~BaseLuceneSearchProvider()
Destructor which ensures that the Search Provider is properly disposed of
Declaration
protected ~BaseLuceneSearchProvider()
Match(IEnumerable<Uri>, string)
Gets results that match the given query.
Declaration
[Obsolete("Replaced by Match(IEnumerable<IRefNode>, string)")]
public virtual IEnumerable<IFullTextSearchResult> Match(IEnumerable<Uri> graphUris, string text)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Uri> | graphUris | Graph URIs. |
string | text | Search Query. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<Uri>, string, double)
Gets results that match the given query with the score threshold applied.
Declaration
[Obsolete("Replaced by Match(IEnumerable<IRefNode>, string, double)")]
public virtual IEnumerable<IFullTextSearchResult> Match(IEnumerable<Uri> graphUris, string text, double scoreThreshold)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Uri> | graphUris | Graph URIs. |
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<Uri>, string, double, int)
Gets results that match the given query with the score threshold and limit applied.
Declaration
[Obsolete("Replaced by Match(IEnumerable<IRefNode>, string, double, int)")]
public virtual IEnumerable<IFullTextSearchResult> Match(IEnumerable<Uri> graphUris, string text, double scoreThreshold, int limit)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Uri> | graphUris | Graph URIs. |
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<Uri>, string, int)
Gets results that match the given query with a limit applied.
Declaration
[Obsolete("Replaced by Match(IEnumerable<IRefNode>, string, int)")]
public virtual IEnumerable<IFullTextSearchResult> Match(IEnumerable<Uri> graphUris, string text, int limit)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Uri> | graphUris | Graph URIs. |
string | text | Search Query. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<IRefNode>, string)
Searches for matches for specific text.
Declaration
public IEnumerable<IFullTextSearchResult> Match(IEnumerable<IRefNode> graphUris, string text)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRefNode> | graphUris | Graph URIs. |
string | text | Search Query. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<IRefNode>, string, double)
Searches for matches for specific text.
Declaration
public IEnumerable<IFullTextSearchResult> Match(IEnumerable<IRefNode> graphUris, string text, double scoreThreshold)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRefNode> | graphUris | Graph URIs. |
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<IRefNode>, string, double, int)
Searches for matches for specific text.
Declaration
public IEnumerable<IFullTextSearchResult> Match(IEnumerable<IRefNode> graphUris, string text, double scoreThreshold, int limit)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRefNode> | graphUris | Graph URIs. |
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(IEnumerable<IRefNode>, string, int)
Searches for matches for specific text.
Declaration
public IEnumerable<IFullTextSearchResult> Match(IEnumerable<IRefNode> graphUris, string text, int limit)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRefNode> | graphUris | Graph URIs. |
string | text | Search Query. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(string)
Gets results that match the given query.
Declaration
public virtual IEnumerable<IFullTextSearchResult> Match(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | Search Query. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(string, double)
Gets results that match the given query with the score threshold applied.
Declaration
public virtual IEnumerable<IFullTextSearchResult> Match(string text, double scoreThreshold)
Parameters
Type | Name | Description |
---|---|---|
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(string, double, int)
Gets results that match the given query with the score threshold and limit applied.
Declaration
public virtual IEnumerable<IFullTextSearchResult> Match(string text, double scoreThreshold, int limit)
Parameters
Type | Name | Description |
---|---|---|
string | text | Search Query. |
double | scoreThreshold | Score Threshold. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
Match(string, int)
Gets results that match the given query with a limit applied.
Declaration
public virtual IEnumerable<IFullTextSearchResult> Match(string text, int limit)
Parameters
Type | Name | Description |
---|---|---|
string | text | Search Query. |
int | limit | Result Limit. |
Returns
Type | Description |
---|---|
IEnumerable<IFullTextSearchResult> |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes Configuration of this Provider.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Serialization Context. |