queries ddb on search