Class BaseSimpleLuceneIndexer
Abstract Implementation of a simple Full Text Indexer using Lucene.Net which indexes the full text of literal objects and associated a specific Node with that full text.
Inheritance
Inherited Members
Namespace: VDS.RDF.Query.FullText.Indexing.Lucene
Assembly: dotNetRdf.Query.FullText.dll
Syntax
public abstract class BaseSimpleLuceneIndexer : BaseSimpleFullTextIndexer, IFullTextIndexer, IDisposable, IConfigurationSerializable
Constructors
| Edit this page View SourceBaseSimpleLuceneIndexer(Directory, Analyzer, IFullTextIndexSchema, IndexingMode)
Creates a new Simple Lucene Indexer.
Declaration
protected BaseSimpleLuceneIndexer(Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema, IndexingMode mode)
Parameters
Type | Name | Description |
---|---|---|
Directory | indexDir | Directory. |
Analyzer | analyzer | Analyzer. |
IFullTextIndexSchema | schema | Index Schema. |
IndexingMode | mode | Indexing Mode. |
Properties
| Edit this page View SourceIndexingMode
Gets the Indexing Mode used.
Declaration
public override IndexingMode IndexingMode { get; }
Property Value
Type | Description |
---|---|
IndexingMode |
Overrides
Methods
| Edit this page View SourceCreateDocument(string, INode, string)
Creates a Lucene document to add to the index.
Declaration
protected virtual Document CreateDocument(string graphUri, INode n, string text)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | Graph URI. |
INode | n | Node. |
string | text | Full Text. |
Returns
Type | Description |
---|---|
Document |
Remarks
May be overridden by derived classes that wish to implement custom indexing behaviour.
DisposeInternal()
Lucene dispose logic that ensures changes to the index are discarded.
Declaration
protected override void DisposeInternal()
Overrides
| Edit this page View SourceFlush()
Flushes any changes to the index.
Declaration
public override void Flush()
Overrides
| Edit this page View SourceGetHash(string, INode, string)
Gets the hash that should be included as part of a document so that it can be unindexed if desired.
Declaration
protected string GetHash(string graphUri, INode n, string text)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | Graph URI. |
INode | n | Node. |
string | text | Full Text. |
Returns
Type | Description |
---|---|
string |
Index(string, INode, string)
Indexes a Node and some full text as a Lucene document.
Declaration
protected override void Index(string graphUri, INode n, string text)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | Graph URI. |
INode | n | Node. |
string | text | Full Text. |
Overrides
| Edit this page View SourceSerializeConfiguration(ConfigurationSerializationContext)
Serializes the Configuration of the Indexer.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Serialization Context. |
Unindex(string, INode, string)
Unindexes a Node and some full text.
Declaration
protected override void Unindex(string graphUri, INode n, string text)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | Graph URI. |
INode | n | Node. |
string | text | Full Text. |