query1 is giving the exact node but takes time and it’s case sensitive.
query2 is giving both the nodes.
I want to use “term” type, as i will need it for searching and other things so i can’t use “exact” type. and also due to it’s case sensitive so that’s not recommended.
There must be a way to get a node by name and name can be case insensitive and should give the node exact matching the name.
Exact and hash are by logic, sensitive. It makes no sense to allow case-insensitive when the function was made for exact things. But this could be discussed.
But if i am having two nodes say >> “abc” and “abc 123”
and if i will try to search by name >> “abc”
It gives me both the nodes. I don’t want that. because it may happen in some cases that the graph is having thousands of nodes starting from “abc”… how will i manage to get the exact node.
I know this, but regexp function doesn’t allow me to get the nodes having space in between their names.
i have the same problem.
lets say we are trying to match username and password,
we cant be using “term” to match username.
i think password is good to be case sensitive, but “username” should not be
any advice? or we are forced to use regex?
A recommendation would be always to use a method equivalent to " toLowerCase()" before write a mutation. As username must be unique, this shouldn’t be a problem.