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

Filtering date-typed attribute performs perfect match on the advanced search result page. #129

Closed
syucream opened this issue May 15, 2021 · 1 comment

Comments

@syucream
Copy link
Contributor

Filtering attributes on advanced search result page basically performs partial match. For e.g. hoge keyword returns a result has hogefuga. But date-typed attribute has a different behavior.

When I get these entries:
image

I put 2021-03 keyword with expecting 2 results has 2021-03-27, but actually it returned nothing:
image

If I put the full date string 2021-03-27, it returns the results.
image

I thinks its not natural, should follow other kinds of attributes.

@syucream
Copy link
Contributor Author

I found a date-specific (undocumented?) trick on elasticsearch module. It accepts a special keyword containing >, < to filter search results with date-range.
https://github.com/dmm-com/airone/blob/ce3c199f23c595a7c029ee52b57297b3666343e3/airone/lib/elasticsearch.py#L529-L553

Actually I succeeded to filter the result, for e.g.:
image

So isn't this issue a problem, its a spec?

@hinashi hinashi closed this as completed Sep 8, 2021
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