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

Support multiple filters for the same attribute #377

Open
JesseDocken opened this issue Apr 25, 2024 · 0 comments
Open

Support multiple filters for the same attribute #377

JesseDocken opened this issue Apr 25, 2024 · 0 comments

Comments

@JesseDocken
Copy link

JesseDocken commented Apr 25, 2024

I'm working on a new JSON-API application on top of ElasticSearch. So far I've got it to the point where it's able to properly query and return results from the database, however when I try to implement a query like:

filter[age]=gt:18&filter[age]=lt:35

The first filter gets replaced by the second. This isn't ideal and so far I haven't been able to find a way around it. Ideally I'd expect the op.params.filter to look something like:

{
  age: [ "gt:18", "lt:35" ]
}

That would be fairly straightforward to parse through and would make it easy to detect if the queries could be combined into a range operator under the covers, for example.

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

1 participant