Examples of deleteAll()


Examples of org.apache.lucene.index.IndexWriter.deleteAll()

    IndexAccessor accessor = null;
    IndexWriter writer = null;
    try {
      accessor = synonym.getSynonymLocation().getAccessor();
      writer = accessor.getWriter();
      writer.deleteAll();
      writer.commit();     
      indexLocation.createReopenFile();
      synonym.getSynonymLocation().resetIndexJobCreationTimes();
    } catch (IOException e) {
      log.error("Could not clear extension-index", e);
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.deleteAll()

    LuceneIndexLocation autocompleteLocation = autocompleter.getAutocompleteLocation();
    IndexAccessor ia = autocompleteLocation.getAccessor();
    IndexWriter writer = null;
    try {
      writer = ia.getWriter();
      writer.deleteAll();
      autocompleteLocation.resetIndexJobCreationTimes();
      autocompleteLocation.createReopenFile();
    } catch (IOException e) {
      log.error("Could not clear index", e);
    } finally {
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.deleteAll()

          // use the number of documents this word appears in
          wordsMap.put(word, sourceReader.docFreq(new Term(autocompletefield, word)));
        }
      }
      // DELETE OLD OBJECTS FROM INDEX
      writer.deleteAll();

      // UPDATE DOCUMENTS IN AUTOCOMPLETE INDEX
      for (String word : wordsMap.keySet()) {
        // ok index the word
        Document doc = new Document();
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.deleteAll()

          // use the number of documents this word appears in
          wordsMap.put(word, sourceReader.docFreq(new Term(autocompletefield, word)));
        }
      }
      // DELETE OLD OBJECTS FROM INDEX
      writer.deleteAll();

      // UPDATE DOCUMENTS IN AUTOCOMPLETE INDEX
      for (String word : wordsMap.keySet()) {
        // ok index the word
        Document doc = new Document();
View Full Code Here

Examples of org.apache.lucene.index.IndexWriter.deleteAll()

    for (int i = 0; i < numReaders; i++) {
      wrappedLeaves[i] = new FacetsPayloadMigrationReader(leaves.get(i).reader(), fieldTerms);
    }
   
    IndexWriter writer = new IndexWriter(indexDir, newIndexWriterConfig(TEST_VERSION_CURRENT, null));
    writer.deleteAll();
    try {
      writer.addIndexes(new MultiReader(wrappedLeaves));
      writer.commit();
    } finally {
      reader.close();
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.deleteAll()

        writer.close();
        return ir;
      }

      // try again
      writer.deleteAll();
    }
  }
 
  @Test
  public void testPad() {
View Full Code Here

Examples of org.apache.lucene.index.RandomIndexWriter.deleteAll()

        writer.close();
        return ir;
      }

      // try again
      writer.deleteAll();
    }
  }
 
  @Test
  public void testPad() {
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.Entityhub.deleteAll()

        Entity entity;
        ResponseBuilder rb;
        try {
            if(id.equals("*")){
                log.info("Deleting all Entities form the Entityhub");
                entityhub.deleteAll();
                rb = Response.status(Response.Status.OK);
            } else {
                entity = entityhub.delete(id);
                if(entity == null){
                    rb = Response.status(Status.NOT_FOUND).entity("An Entity with the" +
View Full Code Here

Examples of org.apache.stanbol.entityhub.servicesapi.site.ManagedSite.deleteAll()

            return builder.build();
        }
        ResponseBuilder builder;
        try {
            if("*".equals(id)){
                managedSite.deleteAll();
                builder = Response.noContent();
            } else if(managedSite.getEntity(id) != null){
                managedSite.delete(id);
                builder = Response.noContent();
            } else {
View Full Code Here

Examples of org.apache.synapse.message.processors.forward.MessageForwardingProcessorView.deleteAll()

                if (processor instanceof ScheduledMessageProcessor) {
                    MessageForwardingProcessorView view =
                            ((ScheduledMessageForwardingProcessor) processor).getView();
                    if (!view.isActive()) {
                        view.deleteAll();
                    } else {
                        log.warn("Can't access Scheduled Message Forwarding Processor - Processor is active");
                    }
                }
            }
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.