"The Sage Of Theare"
is a short story by Diana Wynne Jones.
What Diana Wynne Jones says
"The Sage of Theare" started because I remembered, or thought I remembered, a story by Borges being read on the radio, in which a scholar arduously tracked down a learned man but never quite found him. I started having dreams about it - strange circular dreams in a strange city where gods took a hand - and the dream person never found the wise man he was looking for. In order to exorcise the dreams, I wrote the story. (From Minor Arcana)
It is in several short story collections: Mixed Magics, Minor Arcana, Believing Is Seeing, Hecate's Cauldron, and Unnatural Creatures.