Get information about the current state of an index.
File
File: IndexInfo.java
Package: com.dtsearch.engine
Syntax
Constructors
Constructor |
Description |
---|---|
IndexInfo constructor |
Fields
Field |
Description |
---|---|
The date the index was compressed. | |
The date the index was compressed. | |
Number of documents in the index. | |
IndexingFlags used when this index was created. | |
Measures the extent to which an index is fragmented by being built in multiple indexing jobs. | |
Size of the index, in bytes. | |
Last document id assigned in this index | |
The number of documents for which obsolete information is stored in the index. | |
Indicates how much of the maximum capacity of the index has been used (This is a percentage of the maximum index capacity and does not consider the amount of disk space actually available. | |
First document id assigned, or to be assigned, in this index (will be 1 for an empty index) | |
dtSearch index format version, expressed as minorVersion + majorVersion * 100. 701, for example, means 7.01 | |
The date the index was last updated. | |
Number of unique words in the index. |
Methods
Method |
Description |
---|---|
Retrieves IndexInfo data for an index |
Remarks
IndexInfo.get returns a summary of the current state of an index. Example:
com.dtsearch.engine.IndexInfo info = new com.dtsearch.engine.IndexInfo();
if (!info.get(indexPath))
System.out.println("Unable to open index" + indexPath);
else {
System.out.println("Word count: " + info.wordCount);
System.out.println("Doc count: " + info.docCount);
System.out.println("Last doc id: " + info.lastDocId);
System.out.println("Starting id: " + info.startingDocId);
System.out.println("Updated: " + info.updatedDate.getTime());
System.out.println("Created: " + info.createdDate.getTime());
System.out.println("Compressed: " + info.compressedDate.getTime());
System.out.println("Size: " + info.indexSize);
System.out.println("Percent full: " + info.percentFull);
System.out.println("Structure ver: " + info.structureVersion);
System.out.println("Fragmentation: " + info.fragmentation);
System.out.println("Flags: " + info.flags);
}
Class Hierarchy
com.dtsearch.engine.IndexInfo