Hi, Thanks for responding.
I tried with a temporary FS where the key value was set, but I got every annotation from the index, so that didn’t appear to change anything, and it also broke my unit tests immediately. I also stepped through the iterator implementation and found construction of the iterator quite a bit complex with an FS, so that went over my head without spending time to get a deeper understanding of the underlying index implementation. Therefore I tried with an indexed FS and this seemed to return the correct items, but it would be awkward having to add some FS to the index in order to retrieve something else and then having to remove the FS from the index again. I am now also in doubt about the insertion costs, but I haven’t measured that yet. I am not sure how many use custom FSIndex, but currently the API doesn’t really support very well the type of use cases that we are working with, so this is a disappointment for us. Does UIMA 3 improve on this? We are still on 2.x since we are awaiting the next major DKPro release with UIMA 3 because of dependencies. Thanks a lot and cheers, Mario > On 5 Sep 2019, at 23:42 , Richard Eckart de Castilho <[email protected]> wrote: > > On 5. Sep 2019, at 23:40, Marshall Schor <[email protected]> wrote: >> >> The normal way to get the "binary search" kind of behavior is to get a plain >> iterator over the sorted index, and then use the moveTo method, specifying a >> target FS as the one to move to. The target FS can be a "temporary" FS, one >> that is never added to the indexes, itself; it is just used to supply values >> used in the comparison. > > Is there a way to do this using a "temporary" FS which does not take up CAS > heap > space in UIMAv2? > > -- Richard
