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
System.Object
BaseSimpleLuceneIndexer
Inherited Members
Namespace: VDS.RDF.Query.FullText.Indexing.Lucene
Assembly: dotNetRDF.Query.FullText.dll
Syntax
public abstract class BaseSimpleLuceneIndexer : BaseSimpleFullTextIndexer, IFullTextIndexer, 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 |
---|---|---|
Directory | indexDir | Directory. |
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 |
---|---|
Document |
Remarks
May be overridden by derived classes that wish to implement custom indexing behaviour.
|
Improve this Doc
View Source
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. |
System.String | text | Full Text. |
SerializeConfiguration(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. |
System.String | text | Full Text. |
Implements
IDisposable