Examples of NIOFSDirectory


Examples of org.apache.lucene.store.NIOFSDirectory

    private IndexSearcher indexSearcher;
    private ScoreDoc[] hits;

    public void open(File indexDirectory, Analyzer analyzer) throws IOException {
        if (indexDirectory != null) {
            indexSearcher = new IndexSearcher(IndexReader.open(new NIOFSDirectory(indexDirectory)));
        } else {
            indexSearcher = new IndexSearcher(IndexReader.open(new NIOFSDirectory(new File("./indexDirectory"))));
        }
        this.analyzer = analyzer;
    }
View Full Code Here

Examples of org.apache.lucene.store.NIOFSDirectory

    switch (_mode) {
    case SIMPLE:
      dir = new SimpleFSDirectory(f);
      break;
    case NIO:
      dir = new NIOFSDirectory(f);
      break;
    case MMAP:
      dir = new MMapDirectory(f);
      break;
    }
View Full Code Here

Examples of org.apache.lucene.store.NIOFSDirectory

    switch (_mode) {
    case SIMPLE:
      dir = new SimpleFSDirectory(_location);
      break;
    case NIO:
      dir = new NIOFSDirectory(_location);
      break;
    case MMAP:
      dir = new MMapDirectory(_location);
      break;
    }
View Full Code Here

Examples of org.apache.lucene.store.NIOFSDirectory

        super(shardId, indexSettings, indexStore);
    }

    @Override
    protected Directory newFSDirectory(File location, LockFactory lockFactory) throws IOException {
        return new NIOFSDirectory(location.toPath(), lockFactory);
    }
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.