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

Marshall Schor commented on UIMA-5846:
--------------------------------------

This is probably a mistake on my part when I was copying this from uimaFIT impl 
of "selectBetween" - in thinking that the order would be backwards if the 
operands were reversed.  I'll change this per your suggestion, to just switch 
the endpoints, without reversing the direction.

> Order in SelectFS
> -----------------
>
>                 Key: UIMA-5846
>                 URL: https://issues.apache.org/jira/browse/UIMA-5846
>             Project: UIMA
>          Issue Type: Question
>          Components: Core Java Framework
>    Affects Versions: 3.0.0SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Minor
>
> I'm not sure about the way that order in SelectFS is handled. Naively, I 
> would expect that all operations return annotations in index order or in 
> reverse index order if `backwards` was called. But for example 
> `jcas.select(Sentence.class).between(t1, t2).asList()` returns in normal 
> order if `t1 < t2` and in backwards order if `t2 < t1`. While I this seems to 
> be a nice touch from the engineering point of view, from a naive user's 
> perspective, it seems somewhat surprising to me. Mind that the behavior is 
> documented - still I wonder it if is a good idea. If I wanted to have the 
> annotations in reverse order, I'd probably try calling 
> `jcas.select(Sentence.class).backwards().between(t1, t2).asList()` or maybe 
> `jcas.select(Sentence.class).between(t1, t2).backwards().asList()`.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to