Query filter does not work with booleans
See original GitHub issueHi,
I have a model with a boolean, for example blogpost.published
.
If I query GET /blogposts?published=true, I got nothing because published
in the query sent to mongoose is a String, with “true”, instead of being a Boolean true
.
How can I query booleans ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Elasticsearch boolean query doesn't work with filter
You need to supply minimum_should_match in your first query. I did the following and only got a single document (your desired outcome)
Read more >Solved: oData filter issue with a boolean field
Solved: I'm trying to use oData filter on IsSaleProcessingStopped field in SalesOrderHeaderV2 and having a hard time making it run. This field is...
Read more >BOOLEAN column, can't apply filter in Power BI Desktop?
Solved: I have a boolean true/false measure on one of my tables, but I'm having trouble applying a filter on it. Is this...
Read more >Boolean field filtering does not work when no values are set
The filter is set Restricted access is not equal to TRUE, so it seems to me that NULL values should be included in...
Read more >Boolean query | Elasticsearch Guide [8.5] | Elastic
The clause (query) must not appear in the matching documents. Clauses are executed in filter context meaning that scoring is ignored and clauses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another option is to convert the query values in a hook:
yeah that works, thanks.