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
| Improve this Doc View SourceBaseSimpleLuceneIndexer(Directory, Analyzer, IFullTextIndexSchema, IndexingMode)
Creates a new Simple Lucene Indexer.
Declaration
public BaseSimpleLuceneIndexer(Directory indexDir, Analyzer analyzer, IFullTextIndexSchema schema, IndexingMode mode)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Store.Directory | indexDir | Directory. |
Lucene.Net.Analysis.Analyzer | analyzer | Analyzer. |
IFullTextIndexSchema | schema | Index Schema. |
IndexingMode | mode | Indexing Mode. |
Properties
| Improve this Doc View SourceIndexingMode
Gets the Indexing Mode used.
Declaration
public override IndexingMode IndexingMode { get; }
Property Value
Type | Description |
---|---|
IndexingMode |
Overrides
Methods
| Improve this Doc 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 |
---|---|
Lucene.Net.Documents.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
| Improve this Doc View SourceFlush()
Flushes any changes to the index.
Declaration
public override void Flush()
Overrides
| Improve this Doc 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
| Improve this Doc 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. |