-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Support Request] Case insensitive search? #154
Comments
Upon further experimentation, this appears to be related to whether or not I use This SQS (with
finds all the results with either "email" or "only" in their indexes, and its not case sensitive. However, setting But this SQS (with
Gives no results at all. Setting What am I doing wrong, here? These results don't seem to make much sense. |
Thanks for bringing this to here. Just to try to understand, you would like to have a way to use What you are observing is that 1) Is this correct? The query The AutoQuery would be an issue of the Xapian itself. I think we could create a minimal example and confirm the issue in this backend and use it to report to Xapian. In any case, I agree that this backend is not so well tested when it comes to case sensitiveness. I will see if I get time to improve this. Thanks for your time and effort in getting things together here. |
Ah yes, I'd forgotten that using The real problem is that both of these queries give zero results, when they absolutely shouldn't:
There are objects in my search index which exactly match "Email only", but they don't appear. There are also objects which exactly match "email", but they also don't appear. Bizarrely enough, this query returns the results I would have expected from both of the other two:
So I'm thinking this isn't actually a case sensitivity problem. Searching for "Email" is returning results which only match "email". Yet searching for "email" doesn't return those results. The same thing happens with "Invoice". How the heck is that that happening?? Is there any way to look at the contents of the Xapian index to see if it's somehow capitalizing words that it shouldn't be? Or maybe I'm writing my SearchIndex classes badly?
Is that too little code to make it work properly with Xapian, perhaps? |
I agree that the results are odd. I'm not entirely familiar with what the QueryParser of Xapian does exactly, but maybe the different results you are getting could be because of
http://xapian.org/docs/queryparser.html Yes, I agree with you that the natural path is to see what was indexed in the first place. There is a way to check which terms are on Xapian index, which we use in our test cases: # in tests/test_backend.py
def get_terms(backend, *args):
result = subprocess.check_output(['delve'] + list(args) + [backend.path],
env=os.environ.copy()).decode('utf-8')
result = result.split(": ")[1].strip()
return result.split(" ") At this moment, I think it may be worth to have a minimal example (with e.g. just a couple of entries) where the problem is demonstrated to compare what we get with what what we would expect, so we can think of a solution. Again, thanks a lot for taking the time. |
Whatever happened with this? |
Can the Xapian backend offer case insensitive search? I just switched to Xapian from Whoosh, and without changing any of my code, my searches became case sensitive. I would like to have case insensitive searches, but I have no idea how to turn off case sensitivity.
The text was updated successfully, but these errors were encountered: