Examples of checkIndex()


Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static boolean checkIndex(Directory dir) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);

    CheckIndex checker = new CheckIndex(dir);
    checker.setInfoStream(new PrintStream(bos));
    CheckIndex.Status indexStatus = checker.checkIndex();
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString());
      throw new RuntimeException("CheckIndex failed");
    } else
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, "UTF-8"), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString("UTF-8"));
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);

    CheckIndex checker = new CheckIndex(dir);
    checker.setInfoStream(new PrintStream(bos));
    CheckIndex.Status indexStatus = checker.checkIndex();
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString());
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, "UTF-8"), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString("UTF-8"));
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

            CheckIndex checkIndex = new CheckIndex(store.directory());
            FastByteArrayOutputStream os = new FastByteArrayOutputStream();
            PrintStream out = new PrintStream(os);
            checkIndex.setInfoStream(out);
            out.flush();
            CheckIndex.Status status = checkIndex.checkIndex();
            if (!status.clean) {
                if (state == IndexShardState.CLOSED) {
                    // ignore if closed....
                    return;
                }
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);

    CheckIndex checker = new CheckIndex(dir);
    checker.setInfoStream(new PrintStream(bos));
    CheckIndex.Status indexStatus = checker.checkIndex();
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString());
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, IOUtils.UTF_8), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString(IOUtils.UTF_8));
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, "UTF-8"), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString("UTF-8"));
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, "UTF-8"), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString("UTF-8"));
      throw new RuntimeException("CheckIndex failed");
    } else {
View Full Code Here

Examples of org.apache.lucene.index.CheckIndex.checkIndex()

  public static CheckIndex.Status checkIndex(Directory dir, boolean crossCheckTermVectors) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
    CheckIndex checker = new CheckIndex(dir);
    checker.setCrossCheckTermVectors(crossCheckTermVectors);
    checker.setInfoStream(new PrintStream(bos, false, "UTF-8"), false);
    CheckIndex.Status indexStatus = checker.checkIndex(null);
    if (indexStatus == null || indexStatus.clean == false) {
      System.out.println("CheckIndex failed");
      System.out.println(bos.toString("UTF-8"));
      throw new RuntimeException("CheckIndex failed");
    } else {
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.