@@ -268,14 +268,14 @@ function getTotalCount (total) {
268
268
return typeof total === 'number' ? total : total . value
269
269
}
270
270
271
- function escapeRegex ( str ) {
272
- return str
273
- . replace ( / [ \* \+ \- = ~ > < \" \? ^ \$ { } \( \) \: \! \/ [ \] \\ \s ] / g, '\\$&' ) // replace single character special characters
274
- . replace ( / \| \| / g, '\\||' ) // replace ||
275
- . replace ( / \& \& / g, '\\&&' ) // replace &&
276
- . replace ( / A N D / g, '\\A\\N\\D' ) // replace AND
277
- . replace ( / O R / g, '\\O\\R' ) // replace OR
278
- . replace ( / N O T / g, '\\N\\O\\T' ) ; // replace NOT
271
+ function escapeRegex ( str ) {
272
+ return str
273
+ . replace ( / [ \* \+ \- = ~ > < \" \? ^ \$ { } \( \) \: \! \/ [ \] \\ \s ] / g, '\\$&' ) // replace single character special characters
274
+ . replace ( / \| \| / g, '\\||' ) // replace ||
275
+ . replace ( / \& \& / g, '\\&&' ) // replace &&
276
+ . replace ( / A N D / g, '\\A\\N\\D' ) // replace AND
277
+ . replace ( / O R / g, '\\O\\R' ) // replace OR
278
+ . replace ( / N O T / g, '\\N\\O\\T' ) // replace NOT
279
279
}
280
280
281
281
async function getOrganizationId ( handle ) {
@@ -583,7 +583,6 @@ function setUserAttributesFiltersToEsQuery (filterClause, attributes) {
583
583
attribute . value = [ attribute . value ]
584
584
}
585
585
586
-
587
586
filterClause . push ( {
588
587
nested : {
589
588
path : USER_ATTRIBUTE . esDocumentPath ,
@@ -660,7 +659,7 @@ async function setUserSearchClausesToEsQuery (boolClause, keyword) {
660
659
boolClause . should . push ( {
661
660
query_string : {
662
661
fields : [ 'firstName' , 'lastName' , 'handle' ] ,
663
- query : `*${ keyword . replace ( / + / g, ' ' ) . split ( ' ' ) . join ( '* AND *' ) } *`
662
+ query : `*${ keyword . replace ( / + / g, ' ' ) . split ( ' ' ) . join ( '* OR *' ) } *`
664
663
}
665
664
} )
666
665
0 commit comments