xapian-haystack
xapian-haystack copied to clipboard
SearchBackend.search with highlight converts results to lowercase
SearchBackend.search with highlight converts results to lowercase in the output string as a result of the way it does the search and replace.
This is because we are doing it on the Python side. It is quite difficult to implement highlight on Xapian since, like Sphinx search, it only returns documents ids and not the words that the query matched (since it doesn't even index the document with literal data).
I'm inclined to deprecate highlight functionality for this reason. The current test is already wrong and there is not much we can do about this.