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
| Improve this Doc View SourceBaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema, bool)
Creates a new Base Lucene Search Provider.
Declaration
public BaseLuceneSearchProvider(LuceneVersion ver, Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema, bool autoSync)
Parameters
| Type | Name | Description |
|---|---|---|
| Lucene.Net.Util.LuceneVersion | ver | Lucene Version. |
| Lucene.Net.Store.Directory | indexDir | Directory. |
| Lucene.Net.Analysis.Analyzer | analyzer | Analyzer. |
| IFullTextIndexSchema | schema | Index Schema. |
| System.Boolean | autoSync | Whether the Search Provider should stay in sync with the underlying index. |
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.
BaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema)
Creates a new Base Lucene Search Provider.
Declaration
public BaseLuceneSearchProvider(LuceneVersion ver, Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema)
Parameters
| Type | Name | Description |
|---|---|---|
| Lucene.Net.Util.LuceneVersion | ver | Lucene Version. |
| Lucene.Net.Store.Directory | indexDir | Directory. |
| Lucene.Net.Analysis.Analyzer | analyzer | Analyzer. |
| IFullTextIndexSchema | schema | Index Schema. |
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.
Properties
| Improve this Doc 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 |
|---|---|
| System.Boolean |
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.
Methods
| Improve this Doc View SourceDispose()
Disposes of the Search Provider.
Declaration
public void Dispose()
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.
DisposeInternal()
Virtual method that can be overridden to add implementation specific dispose logic.
Declaration
protected virtual void DisposeInternal()
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.
~BaseLuceneSearchProvider()
Destructor which ensures that the Search Provider is properly disposed of
Declaration
protected ~BaseLuceneSearchProvider()
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><System.Uri> | graphUris | Graph URIs. |
| string | text | Search Query. |
| double | scoreThreshold | Score Threshold. |
| int | limit | Result Limit. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><System.Uri> | graphUris | Graph URIs. |
| string | text | Search Query. |
| double | scoreThreshold | Score Threshold. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><System.Uri> | graphUris | Graph URIs. |
| string | text | Search Query. |
| int | limit | Result Limit. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><System.Uri> | graphUris | Graph URIs. |
| string | text | Search Query. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><IRefNode> | graphUris | Graph URIs. |
| string | text | Search Query. |
| double | scoreThreshold | Score Threshold. |
| int | limit | Result Limit. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><IRefNode> | graphUris | Graph URIs. |
| string | text | Search Query. |
| double | scoreThreshold | Score Threshold. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><IRefNode> | graphUris | Graph URIs. |
| string | text | Search Query. |
| int | limit | Result Limit. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
Match(IEnumerable<IRefNode>, string)
Searches for matches for specific text.
Declaration
public IEnumerable<IFullTextSearchResult> Match(IEnumerable<IRefNode> graphUris, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<T><IRefNode> | graphUris | Graph URIs. |
| string | text | Search Query. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
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 |
|---|---|
| System.Collections.Generic.IEnumerable<T><IFullTextSearchResult> |
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.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes Configuration of this Provider.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurationSerializationContext | context | Serialization Context. |
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.