Package com.dotcms.repackage.org.apache.lucene.index

Examples of com.dotcms.repackage.org.apache.lucene.index.IndexWriterConfig


        IndexWriter writer = null;

                try {

                    Directory directory = FSDirectory.open( new File( luceneDir ) );
                    IndexWriterConfig config = new IndexWriterConfig( Version.LUCENE_CURRENT, new WhitespaceAnalyzer( Version.LUCENE_CURRENT ) );
                    /*
                    IndexWriterConfig.OpenMode.CREATE_OR_APPEND if used IndexWriter will create a new index if there is not
                    already an index at the provided path and otherwise open the existing index.
                     */
                    config.setOpenMode( IndexWriterConfig.OpenMode.CREATE_OR_APPEND );

                    writer = new IndexWriter( directory, config );
                } catch ( IOException e ) {
                    Logger.error( this, e.getMessage(), e );
                }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.lucene.index.IndexWriterConfig

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.