xapian-bridge C port

endlessm/eos-sdk#2463
Needs to be `g_clear_error()` so that `error` can be reused on the next iteration of the loop