Skip to content

Commit 2c18431

Browse files
author
Vikas Agarwal
committed
Adding back the fix for escaping the reserved keywords of elastic search
1 parent 230cf6d commit 2c18431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

connect/service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const getUsersById = (ids) => {
166166
* @return {Promise} resolves to the list of user details
167167
*/
168168
const getUsersByHandle = (handles) => {
169-
const query = _.map(handles, (handle) => 'handle:' + handle.trim()).join(' OR ');
169+
const query = _.map(handles, (handle) => 'handle:"' + handle.trim().replace('"', '\\"') + '"').join(' OR ');
170170
return M2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET)
171171
.catch((err) => {
172172
err.message = 'Error generating m2m token: ' + err.message;

0 commit comments

Comments
 (0)