with fixes to work with sphinx per http://sphinxsearch.com/forum/view.html?id=11339