SaaS CMS has officially launched! Learn more now.

Class LuceneIndexWriter

Wrapper class for the Lucene index writer that queues write requests, ensures all file system resources are disposed as soon as possible, and wraps any file system concurrency exceptions in RetryableIndexingException exceptions.

Inheritance
System.Object
LuceneIndexWriter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Search.Providers.Lucene
Assembly: Mediachase.Search.LuceneSearchProvider.dll
Version: 11.8.3
Syntax
public class LuceneIndexWriter

Constructors

LuceneIndexWriter(Directory, Int32)

Contructor LuceneIndexWriter using Lucene Store Directory base

Declaration
public LuceneIndexWriter(Directory storeDirectory, int commitCount)
Parameters
Type Name Description
Lucene.Net.Store.Directory storeDirectory
System.Int32 commitCount

LuceneIndexWriter(DirectoryInfo, Int32)

Contructor LuceneIndexWriter using System.IO.DirectoryInfo

Declaration
public LuceneIndexWriter(DirectoryInfo directory, int commitCount)
Parameters
Type Name Description
System.IO.DirectoryInfo directory
System.Int32 commitCount

Methods

Commit()

Declaration
public void Commit()

QueueAdd(Document)

Declaration
public bool QueueAdd(Document documentToAdd)
Parameters
Type Name Description
Lucene.Net.Documents.Document documentToAdd
Returns
Type Description
System.Boolean

QueueRemove(Term)

Declaration
public bool QueueRemove(Term termToRemove)
Parameters
Type Name Description
Lucene.Net.Index.Term termToRemove
Returns
Type Description
System.Boolean

QueueRemoveAll()

Declaration
public void QueueRemoveAll()