@Override
 public Engine.Index beforeIndex(Engine.Index index) {
   if (index.type().equals(index().name())) {
     percolator.addQuery(index.id(), index.source());
   }
   return index;
 }
Beispiel #2
0
 @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());
   }
 }
Beispiel #3
0
 @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;
 }
Beispiel #4
0
 public Index(Engine.Index index) {
   this(index.type(), index.id(), index.source());
   this.routing = index.routing();
   this.parent = index.parent();
   this.version = index.version();
 }