Unlike Jackrabbit 2, Oak does not index content by default. Custom indexes need to be created when necessary, much like with traditional relational databases. If there is no index for a specific query then the whole repository will be traversed. The query will still work but probably be very slow.
If Oak encounters a query without an index, a WARN level log message is printed: