Lucene.Net.Index.IndexReader.IsOptimized C# (CSharp) Method

IsOptimized() public method

Checks is the index is optimized (if it has a single segment and no deletions). Not implemented in the IndexReader base class.
public IsOptimized ( ) : bool
return bool
	    public virtual bool IsOptimized()
	    {
	        throw new NotSupportedException("This reader does not support this method.");
	    }

Usage Example

Exemplo n.º 1
0
            public virtual void  OnCommit(System.Collections.IList commits)
            {
                IndexCommit lastCommit = (IndexCommit)commits[commits.Count - 1];
                IndexReader r          = IndexReader.Open(dir);

                Assert.AreEqual(r.IsOptimized(), lastCommit.IsOptimized(), "lastCommit.isOptimized()=" + lastCommit.IsOptimized() + " vs IndexReader.isOptimized=" + r.IsOptimized());
                r.Close();
                Enclosing_Instance.VerifyCommitOrder(commits);
                numOnCommit++;
            }
All Usage Examples Of Lucene.Net.Index.IndexReader::IsOptimized