Skip to content
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

value.lower() prevents correctly execute request es.filter(). #49

Open
onegreyonewhite opened this issue Jul 6, 2016 · 4 comments
Open

Comments

@onegreyonewhite
Copy link
Contributor

onegreyonewhite commented Jul 6, 2016

This is very strange action.
Why are you do this?
I`m saving my data with some upper symbols like "hrStorageUsed".
This action is necessary?

@lauxley
Copy link
Contributor

lauxley commented Jul 6, 2016

Hi, good catch, it probably comes from a special mapping i had or something.
Also the doc seems to be wrong:

Also by default, filters are case insensitive, if you have a case sensitive tokenizer, you need to instantiate EsQueryset with ignore_case=False.

It is actually the exact opposite of the truth i believe, filters are case sensitive unless you use the lowercase filter on an analyzed field ! And the ignore_case argument to EsQueryset doesn't even exists yet.

This is explained in details here : https://www.elastic.co/guide/en/elasticsearch/guide/current/_finding_exact_values.html#_term_query_with_text

Maybe it would be nice to raise something (a warning at least) when trying to .filter() on an analyzed text field ?

@onegreyonewhite
Copy link
Contributor Author

Maybe it would be nice to raise something (a warning at least) when trying to .filter() on an analyzed text field ?
Nice idea.
I was fix this on my project by create EsQueryset class and remove this action.

@lauxley
Copy link
Contributor

lauxley commented Jul 24, 2016

I opened a PR #51, it should solve the problem along with some other filters issues (maybe even #50 but i didn't make a test case yet).

@onegreyonewhite
Copy link
Contributor Author

This issue could be closed if PR #51 will merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants