ActionFilter in ActionPlugin not being applied for certain actions

Hi all,

we are writing an Plugin that attempts to intercept every write to a Lucene index and retreive http-Headers in there and perform some operations then ...

We therefore implemented an ActionPlugin and registered our ActionFilter in which we see most of the actions: we see IndexWrite, IndexCreate, IndexClose, Bulk - Acionts and much more

The only situation we currently encountered, when we do not see the acion, is if a replica shard on a non-master node is written. It seems, that this operation first goes to the translog and from there later to the index. But neither of the both actions is seen in our filter.
We debuged a bit, and found, that an AsynchronousAction is created and run, and that this holds a task that contains our http - headers. But we do not know, how we could intercept this.

Can somebody help and give us some pointer? Is there another plugin that would have to be implemented or another method that would have to be overwritten ?

Thanks!

Martin Huber

maybe you want to with an IndexingOperationListener, that is called before a document is index, but at that stage you do not have access to the HTTP headers anymore, so the document should probably have been modified before that.

Is it possible to have something like volatile fields in a Document, that are added somewhere by a Plugin but are not written into the index ?
Where are the ParsedDocument with its List<Document> created ? On the node, that is responsible for the writing into the shards, or already on the Master ?

the master node does not deal with indexing data at all, otherwise you would have a scaling limit.

The lucene document is created during the mapping process, on each node that indexes the document.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.