Examples of IndexWriter


Examples of org.apache.maven.archiva.webdav.util.IndexWriter

                IOUtils.closeQuietly( is );
            }
        }
        else if (outputContext.hasStream())
        {
            IndexWriter writer = new IndexWriter( this, localResource, logicalResource );
            writer.write( outputContext );
        }
    }
View Full Code Here

Examples of org.apache.phoenix.hbase.index.write.IndexWriter

        }
   
        this.builder = new IndexBuildManager(env);

        // setup the actual index writer
        this.writer = new IndexWriter(env, serverName + "-index-writer");
   
        // setup the recovery writer that does retries on the failed edits
        TrackingParallelWriterIndexCommitter recoveryCommmiter =
            new TrackingParallelWriterIndexCommitter();
   
        try {
          // get the specified failure policy. We only ever override it in tests, but we need to do it
          // here
          Class<? extends IndexFailurePolicy> policyClass =
              env.getConfiguration().getClass(INDEX_RECOVERY_FAILURE_POLICY_KEY,
                StoreFailuresInCachePolicy.class, IndexFailurePolicy.class);
          IndexFailurePolicy policy =
              policyClass.getConstructor(PerRegionIndexWriteCache.class).newInstance(failedIndexEdits);
          LOG.debug("Setting up recovery writter with committer: " + recoveryCommmiter.getClass()
              + " and failure policy: " + policy.getClass());
          recoveryWriter =
              new IndexWriter(recoveryCommmiter, policy, env, serverName + "-recovery-writer");
        } catch (Exception ex) {
          throw new IOException("Could not instantiate recovery failure policy!", ex);
        }
      } catch (NoSuchMethodError ex) {
          disabled = true;
View Full Code Here

Examples of org.jboss.jandex.IndexWriter

        try (final InputStream resource = ModuleServlet.class.getResourceAsStream(ModuleServlet.class.getSimpleName() + ".class")) {
            indexer.index(resource);
        }
        Index index = indexer.complete();
        ByteArrayOutputStream data = new ByteArrayOutputStream();
        IndexWriter writer = new IndexWriter(data);
        writer.write(index);
        jar.addAsManifestResource(new ByteArrayAsset(data.toByteArray()), "jandex.idx");
        FileOutputStream jarFile = new FileOutputStream(new File(file, "webTest.jar"));
        try {
            jar.as(ZipExporter.class).exportTo(jarFile);
        } finally {
View Full Code Here

Examples of org.modeshape.jcr.spi.index.IndexWriter

     * Reindex the repository only if there is at least one provider that required scanning and reindexing.
     */
    protected void reindexIfNeeded() {
        final ScanningRequest request = toBeScanned.drain();
        if (!request.isEmpty()) {
            final IndexWriter writer = indexManager.getIndexWriterForProviders(request.providerNames());
            final RepositoryCache repoCache = runningState.repositoryCache();
            scan(true, writer, new Callable<Void>() {
                @Override
                public Void call() throws Exception {
                    // Scan each of the workspace-path pairs ...
View Full Code Here

Examples of uk.ac.ucl.panda.indexing.io.IndexWriter

       Config config = new Config(appProp);
       docMaker.setConfig(config);
       HTMLParser htmlParser = (HTMLParser) Class.forName(config.get("html.parser","uk.ac.ucl.panda.applications.demo.DemoHTMLParser")).newInstance();
       docMaker.setHTMLParser(htmlParser);
      
       IndexWriter writer = new IndexWriter(indexDir,
          new PorterStemAnalyzer(), true);
      writer.setUseCompoundFile(false);
     
     long start = new Date().getTime();
       while ((doc = docMaker.makeDocument()) != null) {
         writer.addDocument(doc);// add Document to index   
       }

   
   
    int numIndexed = writer.docCount();
    writer.optimize();
    writer.close();
                long end = new Date().getTime();
    System.out.println("Indexing " + numIndexed + " files took " + (end - start)+ " milliseconds");
                ExtraInformation EI= new ExtraInformation(index, field);
                EI.addExtraInformation();
               
View Full Code Here

Examples of writers.IndexWriter

  public static boolean start(RootDoc root)
  {
    setConfig(root.options());
    Shared.i().createBaseDirectories();

    indexWriter = new IndexWriter();
   
    try
    {
      // write out everything in the .java files:
      // Classes, Methods, Fields ... see specific XxxWriters
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.