Skip to content

Commit

Permalink
Fix bug in BuildEqualityPredicate
Browse files Browse the repository at this point in the history
When adding quotes to the predicate, redis throws/returns the following error:

```
"Invalid argument(s): Closing quote must be followed by a space or nothing at all."
```

This works:
`"FT.SEARCH" "idx" @name:"Test"`

But this does not:
`"FT.SEARCH" "idx" (@name:"Test")`

So I thought it would be safer to remove the quotes
  • Loading branch information
ahmedisam99 authored Jul 21, 2024
1 parent 4890559 commit 4a3a908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Redis.OM/Common/ExpressionTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ private static string BuildEqualityPredicate(MemberExpression member, string rig
sb.Append($"{{{ExpressionParserUtilities.EscapeTagField(right)}}}");
break;
case SearchFieldType.TEXT:
sb.Append($"\"{right}\"");
sb.Append($"{right}");
break;
case SearchFieldType.NUMERIC:
sb.Append($"[{right} {right}]");
Expand Down

0 comments on commit 4a3a908

Please sign in to comment.