Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

Filtering string fields will not work when filter value consists of numbers  #71

@Halt001

Description

@Halt001

qs.parse({"foo":">1"}) results in {"foo":{"$gt":1}} and not {"foo":{"$gt":"1"}} where the '1' is converted to a Number field automatically. If the foo field is a string field in the database than this search query will find nothing.

I haven't tested it but this will probably also be true for booleans. So you probably can't filter a text field on the word 'true'.

There should be a way to force the creation of a string filter for values that could also be a number or a boolean.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions