Example usage for org.apache.lucene.replicator IndexRevision IndexRevision

List of usage examples for org.apache.lucene.replicator IndexRevision IndexRevision

Introduction

In this page you can find the example usage for org.apache.lucene.replicator IndexRevision IndexRevision.

Prototype

public IndexRevision(IndexWriter writer) throws IOException 

Source Link

Document

Constructor over the given IndexWriter .

Usage

From source file:com.qwazr.search.bench.LuceneNoTaxonomyIndex.java

License:Apache License

@Override
final synchronized public void commitAndPublish() throws IOException {
    if (!indexWriter.hasUncommittedChanges())
        return;// ww w  .j  a  v a  2 s  . c o m
    indexWriter.flush();
    indexWriter.commit();
    searcherManager.maybeRefresh();
    localReplicator.publish(new IndexRevision(indexWriter));
}