xapian-bridge C port

endlessm/eos-sdk#2463
That's because I hem hem copy-pasted that from somewhere else :see_no_evil: