I have a collection that has base64-encoded identifiers.
If I have a query such as:
{
query(func: anyofterms(_node_id, "ZolFpqy28/CkH3w4Ne7XOA==")) {
_node_id
}
}
The result set is expected:
{
"data": {
"query": [
{
"_node_id": "ZolFpqy28/CkH3w4Ne7XOA==",
}
]
},
}
But if the search term has a + in it, such as:
{
query(func: anyofterms(_node_id, "mC+\\Sqd0ez6+fsk4r1pQkSw==")) {
_node_id
}
}
The result set includes any term that has “mc” in it, such as:
{
"data": {
"query": [
{
"_node_id": "sE8Y6v93l+SG/mC/vailRw=="
},
{
"_node_id": "MC/6bDfKY+kdAPwDeNd6gA=="
},
{
"_node_id": "mC+zvUKVjBdu7naczA7cmQ=="
},
{
"_node_id": "29N/mC/N6+gKmqK3XGT5SQ=="
},
{
"_node_id": "mC/+EV+P0rlj6FDeKiiR7g=="
},
{
"_node_id": "mc/J9cXDQhzq4pJ162z+JA=="
},
{
"_node_id": "P+Mc+CVDyKmB6q0MVuwNqA=="
},
I’m using Dgraph 20.07.
So, I guess this leads to an interesting question, what’s the best way then to search for lots of terms that have these sorts of characters in them? Do I need to chain together eq
filters with OR
combinators?