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

Examples of com.dotcms.repackage.org.apache.lucene.store.Directory


        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.
                     */
 
View Full Code Here


    return IndexReader.open(FSDirectory.open(new File(getLuceneDir(companyId))));
  }

    public static IndexSearcher getSearcher ( String companyId ) throws IOException {

        Directory directory = FSDirectory.open( new File( getLuceneDir( companyId ) ) );
        DirectoryReader ireader = DirectoryReader.open( directory );

        return new IndexSearcher( ireader );
    }
View Full Code Here

    return getWriter(companyId, false);
  }

    public static IndexWriter getWriter ( String companyId, boolean create ) throws IOException {

        Directory directory = FSDirectory.open( new File( getLuceneDir( companyId ) ) );
        IndexWriterConfig config = new IndexWriterConfig( Version.LUCENE_CURRENT, new SimpleAnalyzer( Version.LUCENE_CURRENT ) );

        return new IndexWriter( directory, config );
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.lucene.store.Directory

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.