Show / Hide Table of Contents

Class BaseLuceneSearchProvider

Abstract Base Implementation of a Full Text Search Provider using Lucene.Net.

Inheritance
object
BaseLuceneSearchProvider
LuceneSearchProvider
Implements
IFullTextSearchProvider
IDisposable
IConfigurationSerializable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

BaseLuceneSearchProvider(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.

| Edit this page View Source

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 Source

IsAutoSynced

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 Source

Dispose()

Disposes of the Search Provider.

Declaration
public void Dispose()
| Edit this page View Source

DisposeInternal()

Virtual method that can be overridden to add implementation specific dispose logic.

Declaration
protected virtual void DisposeInternal()
| Edit this page View Source

~BaseLuceneSearchProvider()

Destructor which ensures that the Search Provider is properly disposed of

Declaration
protected ~BaseLuceneSearchProvider()
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

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>
| Edit this page View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes Configuration of this Provider.

Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type Name Description
ConfigurationSerializationContext context

Serialization Context.

Implements

IFullTextSearchProvider
IDisposable
IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • BaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema)
    • BaseLuceneSearchProvider(LuceneVersion, Directory, Analyzer, IFullTextIndexSchema, bool)
  • Properties
    • IsAutoSynced
  • Methods
    • Dispose()
    • DisposeInternal()
    • ~BaseLuceneSearchProvider()
    • Match(IEnumerable<Uri>, string)
    • Match(IEnumerable<Uri>, string, double)
    • Match(IEnumerable<Uri>, string, double, int)
    • Match(IEnumerable<Uri>, string, int)
    • Match(IEnumerable<IRefNode>, string)
    • Match(IEnumerable<IRefNode>, string, double)
    • Match(IEnumerable<IRefNode>, string, double, int)
    • Match(IEnumerable<IRefNode>, string, int)
    • Match(string)
    • Match(string, double)
    • Match(string, double, int)
    • Match(string, int)
    • SerializeConfiguration(ConfigurationSerializationContext)
  • Implements
  • Extension Methods
Back to top Generated by DocFX