Package org.apache.lenya.lucene

Examples of org.apache.lenya.lucene.IndexConfiguration


     *   <li>unchanged documents, to be left alone, or</li>
     *   <li>new documents, to be indexed.</li>
     * </ol>
     */
    public void indexDocument(File file) throws Exception {
        IndexConfiguration config = new IndexConfiguration(configFileName);
        log.debug("File: " + file);

        File dumpDir = new File(config.resolvePath(config.getHTDocsDumpDir()));
        log.debug("Dump dir: " + dumpDir);

        File indexDir = new File(config.resolvePath(config.getIndexDir()));
        log.debug("Index dir: " + indexDir);


  String id = IndexIterator.createID(file, dumpDir);

View Full Code Here


                System.err.println("Usage: " + usage);

                return;
            }

            IndexConfiguration ie = new IndexConfiguration(argv[0]);
            index = ie.resolvePath(ie.getIndexDir());
            root = new File(ie.resolvePath(ie.getHTDocsDumpDir()));

            if (ie.getUpdateIndexType().equals("new")) {
                create = true;
            } else if (ie.getUpdateIndexType().equals("incremental")) {
                create = false;
            } else {
                System.err.println("ERROR: No such update-index/@type: " + ie.getUpdateIndexType());

                return;
            }

            Date start = new Date();

            Indexer indexer = (Indexer) ie.getIndexerClass().newInstance();

            DOMUtil du = new DOMUtil();
            String path = argv[0];
           
            Document config = DocumentHelper.readDocument(new File(path));
View Full Code Here

TOP

Related Classes of org.apache.lenya.lucene.IndexConfiguration

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.