[ https://issues.apache.org/jira/browse/SOLR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13621270#comment-13621270 ]
Vadim Kirilchuk commented on SOLR-1393: --------------------------------------- AFAIK apache CXF has similar thing for configuring Interceptors. http://cxf.apache.org/javadoc/latest/org/apache/cxf/phase/PhaseInterceptorChain.html They have class PhaseInterceptorChain.java, where they call {code} public void add(Collection<Interceptor<? extends Message>> newhandlers) { add(newhandlers, false); } {code} actually they cast newhandlers to PhaseInterceptor later. And if you look at http://cxf.apache.org/javadoc/latest/org/apache/cxf/phase/PhaseInterceptor.html you will see getBefore() and getAfter() methods exactly like you want. You also can find a source code of PhaseInterceptorChain and check method #insertInterceptor(...) which contains tricky inserting logic. Actually they have a little bit more complex logic then just before\after as they also have a notion of Phase for each interceptor. Anyway, wdyt about making things like so? Another question is how one should configure such components ordering - through xml, or exactly like in CXF - hardcoded in the components: {code} public class SoapActionInInterceptor extends AbstractSoapInterceptor { public SoapActionInInterceptor() { super(Phase.READ); addAfter(ReadHeadersInterceptor.class.getName()); addAfter(EndpointSelectionInterceptor.class.getName()); } //... } {code} > Allow more control over SearchComponents ordering in SearchHandler > ------------------------------------------------------------------ > > Key: SOLR-1393 > URL: https://issues.apache.org/jira/browse/SOLR-1393 > Project: Solr > Issue Type: Improvement > Reporter: Grant Ingersoll > Priority: Minor > Labels: newdev > Fix For: 4.3 > > > It would be useful to be able to add the notion of before/after when > declaring search components. Currently, you can either explicitly declare > all components or insert at the beginning or end. It would be nice to be > able to say: this new component comes after the Query component without > having to declare all the components. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org