Close
dtSearch Engine API for Java
IndexInfo Class

Get information about the current state of an index.

File: IndexInfo.java 

Package: com.dtsearch.engine 

Syntax
Java
public class IndexInfo;

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); }
com.dtsearch.engine.IndexInfo