Package org.apache.lucene.facet.taxonomy.directory

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader.refresh()


    assertEquals(0, checker.nopen());

    tr = checker.openReader(dir);
    tw = checker.openWriter(dir);
    tw.addCategory(new CategoryPath("animal", "cat"));
    tr.refresh();
    tw.commit();
    tw.close();
    tr.refresh();
    tr.close();
    assertEquals(0, checker.nopen());
View Full Code Here


    tw = checker.openWriter(dir);
    tw.addCategory(new CategoryPath("animal", "cat"));
    tr.refresh();
    tw.commit();
    tw.close();
    tr.refresh();
    tr.close();
    assertEquals(0, checker.nopen());

    tw = checker.openWriter(dir);
    for (int i=0; i<10000; i++) {
View Full Code Here

     
      ltw.addCategory(new CategoryPath("a"));
      ltw.commit();
     
      ltr = new DirectoryTaxonomyReader(dir);
      assertFalse("Nothing has changed",ltr.refresh());
     
      ltw.addCategory(new CategoryPath("b"));
      ltw.commit();
     
      assertTrue("changes were committed",ltr.refresh());
View Full Code Here

      assertFalse("Nothing has changed",ltr.refresh());
     
      ltw.addCategory(new CategoryPath("b"));
      ltw.commit();
     
      assertTrue("changes were committed",ltr.refresh());
      assertFalse("Nothing has changed",ltr.refresh());
    } finally {
      IOUtils.close(ltw, ltr, dir);
    }
  }
View Full Code Here

     
      ltw.addCategory(new CategoryPath("b"));
      ltw.commit();
     
      assertTrue("changes were committed",ltr.refresh());
      assertFalse("Nothing has changed",ltr.refresh());
    } finally {
      IOUtils.close(ltw, ltr, dir);
    }
  }
 
View Full Code Here

    taxoReader.incRef();
    assertEquals("wrong refCount", 2, taxoReader.getRefCount());

    taxoWriter.addCategory(new CategoryPath("a", "b"));
    taxoWriter.commit();
    taxoReader.refresh();
    assertEquals("wrong refCount", 2, taxoReader.getRefCount());

    taxoWriter.close();
    taxoReader.close();
    dir.close();
View Full Code Here

    tw.close();
    assertEquals(0, checker.nopen());

    DirectoryTaxonomyReader tr = checker.openReader(dir);
    tr.getPath(1);
    tr.refresh();
    tr.close();
    assertEquals(0, checker.nopen());

    tr = checker.openReader(dir);
    tw = checker.openWriter(dir);
View Full Code Here

    assertEquals(0, checker.nopen());

    tr = checker.openReader(dir);
    tw = checker.openWriter(dir);
    tw.addCategory(new CategoryPath("animal", "cat"));
    tr.refresh();
    tw.commit();
    tw.close();
    tr.refresh();
    tr.close();
    assertEquals(0, checker.nopen());
View Full Code Here

    tw = checker.openWriter(dir);
    tw.addCategory(new CategoryPath("animal", "cat"));
    tr.refresh();
    tw.commit();
    tw.close();
    tr.refresh();
    tr.close();
    assertEquals(0, checker.nopen());

    tw = checker.openWriter(dir);
    for (int i=0; i<10000; i++) {
View Full Code Here

     
      ltw.addCategory(new CategoryPath("a"));
      ltw.commit();
     
      ltr = new DirectoryTaxonomyReader(dir);
      assertFalse("Nothing has changed",ltr.refresh());
     
      ltw.addCategory(new CategoryPath("b"));
      ltw.commit();
     
      assertTrue("changes were committed",ltr.refresh());
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.