List of usage examples for org.apache.lucene.index IndexWriter hasPendingMerges
public synchronized boolean hasPendingMerges()
From source file:org.elasticsearch.index.engine.internal.AsynchronousEngine.java
License:Apache License
@Override public boolean possibleMergeNeeded() { IndexWriter writer = this.indexWriter; if (writer == null) { return false; }//from ww w.j ava 2s . c o m // a merge scheduler might bail without going through all its pending merges // so make sure we also check if there are pending merges return this.possibleMergeNeeded || writer.hasPendingMerges(); }