@Override public Engine.Index beforeIndex(Engine.Index index) { if (index.type().equals(index().name())) { percolator.addQuery(index.id(), index.source()); } return index; }
@Override public void postIndexUnderLock(Engine.Index index) { // add the query under a doc lock if (PercolatorService.TYPE_NAME.equals(index.type())) { addPercolateQuery(index.id(), index.source()); } }
@Override public Engine.Index preIndex(Engine.Index index) { // validate the query here, before we index if (PercolatorService.TYPE_NAME.equals(index.type())) { parsePercolatorDocument(index.id(), index.source()); } return index; }
public Index(Engine.Index index) { this(index.type(), index.id(), index.source()); this.routing = index.routing(); this.parent = index.parent(); this.version = index.version(); }