Package com.googlecode.lucene.gae.datastore

Examples of com.googlecode.lucene.gae.datastore.DataStoreDirectory


  @Test
  public void testReader() throws Exception {

    int hits = 1;

    Directory gaeDir = new DataStoreDirectory();

    String[] texts = { "Lucene in Action" };

    TestUtils.write(gaeDir, texts);
View Full Code Here


  @Test
  public void testReader2() throws Exception {

    int hits = 3;

    Directory gaeDir = new DataStoreDirectory();

    String[] texts = { "Lucene in Action", "How Lucene Works", "Another Directory of Lucene" };

    TestUtils.write(gaeDir, texts);
View Full Code Here

  }

  @Test
  public void testClean() throws Exception {

    Directory dir = new DataStoreDirectory("teste");

    IndexTool tool = new IndexTool(dir);

    tool.clean();
View Full Code Here

  }

  @Test
  public void testOptimize() throws Exception {

    Directory dir = new DataStoreDirectory("teste");

    IndexTool tool = new IndexTool(dir);

    tool.optimize(TestUtils.getWriterConfig());
View Full Code Here

  }

  @Test
  public void testOptimizeAndClean() throws Exception {

    Directory dir = new DataStoreDirectory("teste");

    IndexTool tool = new IndexTool(dir);

    tool.optimizeAndClean(TestUtils.getWriterConfig());
View Full Code Here

  protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    int index = getIndex();

    String name = LuceneUtils.getNameForDirectory(index);
    DataStoreDirectory directory = new DataStoreDirectory(name);

    directory.cleanFiles();

    System.out.println("Index=" + index);

  }
View Full Code Here

    if (key != null) {

      String name = LuceneUtils.getNameForDirectory(index);

      DataStoreDirectory directory = new DataStoreDirectory(name);

      IndexTool tool = new IndexTool(directory);

      BlobstoreInputStream in = new BlobstoreInputStream(key);
View Full Code Here

    if (index != null) {

      String name = LuceneUtils.getNameForDirectory(index);

      DataStoreDirectory directory = new DataStoreDirectory(name);

      IndexTool tool = new IndexTool(directory);

      resp.setContentType("application/zip");
View Full Code Here

    if (index != null) {

      String name = LuceneUtils.getNameForDirectory(index);

      DataStoreDirectory directory = new DataStoreDirectory(name);

      directory.deleteFiles();

    }

  }
View Full Code Here

TOP

Related Classes of com.googlecode.lucene.gae.datastore.DataStoreDirectory

Copyright © 2018 www.massapicom. 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.