-
Notifications
You must be signed in to change notification settings - Fork 30
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
How to make the msearch query case insensitive? #43
Comments
I was wondering the same. |
Up! Still relevant |
I have added an example about query case insensitive, please check it.
https://github.com/honmaple/flask-msearch/blob/master/test/test_whoosh.py#L61 |
Thank you for your response. I edited my models file, added imports, schema and analyzers but it didn't work. |
@honmaple However, the search now works only with whole words. |
@yovthxx Can you show the search text and search keywords? @tnedev Well, now works only with whole words this is because of the selected whoosh analyzer that only support whole word index, if you want support more keywords search, you can use
But this will make search slower. |
Thanks. I'm adding wildcard during the handling of the request and it works fine. |
@honmaple This is my searchable model, I have imported the RegexTokenizer and added the CaseSentivizer in models
And this is my search route
My init lines related to search are as follows and no engine set in config (default)
It seems like the changes take no effect, so I think I missed something. I also hit recursion when I try to delete/update index. Sorry, my first time with Flask and Python in general |
Hello!
I am using msearch with sqlalchemy in my project and found out in testing that it is case sensitive. Is there a viable way to sort it out? I know to make a basic sqlalchemy query case insensitive using lower/upper, but I couldn't find a way to implement the same for your msearch syntax.
Please help :)
edit: Adding my queries as an example. First - search query that I would like to make case insensitive, second one is my solution to the same situation outside of msearch.
The text was updated successfully, but these errors were encountered: