It should be usefull to have some kind of policy for the pipeline (reset) that should be applied every Documents or every Query submitted to the system.
You want put in the pipeline a stage that is re-initialized every Query.
Here i'm going to give my solution.
The solution refactoring the org.terrier.terms introducing the reset() method in
TermPipeline interface and TermPipelineAccessor.
This change in interface affected all the TermPipeline so new base class (BaseTermPipeline) was created and inerithed by all TermPipeline.
BaseTermPipeline give a default implementation of reset() method and also move the "next" atribute in it.
The patch also affected the Manager class and many Indexer classes:
Thanks to all.