willholley commented on code in PR #4810:
URL: https://github.com/apache/couchdb/pull/4810#discussion_r1373322353


##########
src/mango/src/mango_selector_text.erl:
##########
@@ -142,6 +142,10 @@ convert(Path, {[{<<"$exists">>, ShouldExist}]}) ->
         true -> FieldExists;
         false -> {op_not, {FieldExists, false}}
     end;
+convert(Path, {[{<<"$beginsWith">>, Arg}]}) when is_binary(Arg) ->
+    Suffix = <<"*">>,
+    PrefixSearch = value_str(<<Arg/binary, Suffix/binary>>),
+    {op_field, {make_field(Path, Arg), PrefixSearch}};

Review Comment:
   thanks - I included the fix and added some covering test cases for escaped 
characters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to