ModeShape/modeshape — pull request #1230 by rhauch (2014-09-02 21:30:18+00:00)
Title: MODE-2151 Added support for CHILDCOUNT dynamic operand and the 'mode:childCount' pseudocolumn

Pretty basic support that should prove quite useful in certain situations. This may be relatively expensive when the repository has nodes with lots of children since it requires loading the parent node's child references in order to obtain the count. The `CHILDCOUNT` criteria would therefore work much better/faster as filtering criteria in a query that already defines criteria that indexes can use.

BTW, because the index update mechanism is based upon change events, and because change events never include the number of children, it's currently not possible to define an index on `mode:childCount`.