On Fri, 11 Aug 2006, John Anderson wrote:

It looks I didn't make my question clear.

If I have a collection, User with a numeric index named "__adhoc__" and a collection, OutOfTheBox with a numeric index named "__adhoc__". How do I create an index on the Union collection of the User and OutOfTtheBox that automatically maintains the order of User's __adhoc__ index followed by OutOfTheBox's __adhoc__ index?

If the User and OutOfTheBox collections are backed by a ref collection then the Union will reflect these orders too. If the __adhoc__ indexes are in a different order than the ref collection they index, then you'd have to create the Union's index and reorder it along the two collections' indexes with the Indexed.placeInIndex() API.

If the order changes in User or OutOfTheBox once the union's index is created, there is currently no automatic way to reflect that order change in the Union's index.

Next, suppose I set the selection on each collection, User and OutOfTheBox (which internally delegates the selection to their respective __adhoc__ indexes). Can I make the selection of the Union collection match that of their respective combined collections?

For the same reason as above, I don't think so. You wrote the selection code so you might have a better answer.

Basically, numeric index order changes are currently not propagated to outer collections, only the addition or removal of keys from indexes are. While this feature could be implemented in some situations, it's hard to generalize.

Given the issues we've had with sub-indexes, I'd rather avoid introducing more such indexes that depend on each other across items.

Andi..
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to