Bitcoinj is not designed for building block explorers or web wallets where that kind of query is common, it's intended for building p2p apps that use local wallets. So that's why you can't figure out how to do it. You could extend the fully verifying store to build the extra indexes and some people have done exactly that, but they never contributed their code upstream.