Examples of FindSegmentsFile


Examples of org.apache.lucene.index.SegmentInfos.FindSegmentsFile

   * @param  directory the directory to check for an index
   * @return <code>true</code> if an index exists; <code>false</code> otherwise
   */
  public static boolean indexExists(Directory directory) {
    try {
      new FindSegmentsFile(directory) {
        @Override
        protected Object doBody(String segmentFileName) throws IOException {
          try {
            new SegmentInfos().read(directory, segmentFileName);
          } catch (FileNotFoundException ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.