extract query configuration to it's own xml