[ 
https://issues.apache.org/jira/browse/SOLR-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13653194#comment-13653194
 ] 

Vadim Kirilchuk commented on SOLR-1393:
---------------------------------------

Just tried to implement the stuff exactly like in cxf. The problem is:
bq. The PhaseInterceptorChain will not reorder items already in the chain to 
meet new requirements.

If i have
 5 components with names "0","1","2","3","4" with following before and after:
"0" must be before "1" and "4"
"1" must be before "2" but after "0"
"2" must be before "4" but after "1"
"3" must be after "1" and "2"
"4" has no befors or afters
as you can see the rule is very simple
n-th element befors can be any from n + 1
n-th element afters can be any from 0, n

If you try to add this components in shuffled order: 4, 2, 0, 1, 3
Here is what you get in the chain step by step
4
2, 4
2, 0, 4
1, 2, 0, 4
1, 2, 0, 4, 3

as you can see constraint for "0" is broken.

Here is full explanation from cxf commiter:
bq. Somewhat working as designed. The PhaseInterceptorChain will not reorder 
items already in the chain to meet new requirements. In step 3 above (adding 
0), that resulting order (2, 0, 4) is perfectly valid according to the 
restraints available at that time. From that point on, nothing would make 0 
move from between the 2 and the 4.

[~gsingers]
Could you please clarify what do you want in this JIRA? Usecases, etc..
                
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to