Package org.apache.lenya.lucene.index

Examples of org.apache.lenya.lucene.index.Indexer


            log.debug("Lucene configuration: " + luceneConfig);

            String luceneConfigAbsolutePath = servletContextPath + File.separator + "lenya" + File.separator + "pubs" + File.separator + publicationId  + File.separator + luceneConfig;
            log.debug("Lucene configuration: " + luceneConfigAbsolutePath);

            Indexer indexer = Index.getIndexer(luceneConfigAbsolutePath);
      indexer.indexDocument(new File(files));
        } catch (Exception e) {
            log.error("" + e);
        }
    }
View Full Code Here


    /**
     * @see org.apache.lenya.cms.task.Task#execute(java.lang.String)
     */
    public void execute(String servletContextPath) throws ExecutionException {
        Indexer indexer;
        String files;
        try {
            //outputParameters();

            log.debug("Servlet context path: " + servletContextPath);

            String publicationId = getParameters().getParameter("publication-id");
            log.debug("Publication ID: " + publicationId);

            files = getParameters().getParameter("properties.files2index");
            log.debug("Files 2 index: " + files);

            String luceneConfig = getParameters().getParameter("config");
            log.debug("Lucene configuration: " + luceneConfig);

            String luceneConfigAbsolutePath = servletContextPath + File.separator + "lenya" + File.separator + "pubs" + File.separator + publicationId  + File.separator + luceneConfig;
            log.debug("Lucene configuration: " + luceneConfigAbsolutePath);

            indexer = Index.getIndexer(luceneConfigAbsolutePath);
          indexer.indexDocument(new File(files));
        } catch (final ParameterException e) {
            log.error("" +e.toString());
            throw new ExecutionException(e);
        } catch (Exception e) {
            log.error("" +e.toString());
View Full Code Here

            log.debug("Lucene configuration: " + luceneConfig);

            String luceneConfigAbsolutePath = servletContextPath + File.separator + "lenya" + File.separator + "pubs" + File.separator + publicationId  + File.separator + luceneConfig;
            log.debug("Lucene configuration: " + luceneConfigAbsolutePath);

            Indexer indexer = Index.getIndexer(luceneConfigAbsolutePath);
      indexer.indexDocument(new File(files));
        } catch (Exception e) {
            log.error("" + e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.lucene.index.Indexer

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.