Revert "Revert "Core Query""

This reverts commit 667fe1697fb2010727e18ef8995b7c4411864ab9.