@@ -1041,10 +1041,7 @@ function uploadFile(myfile, id, callback) {
1041
1041
query . device_id = params . qstring . device_id ;
1042
1042
}
1043
1043
if ( params . qstring . sSearch && params . qstring . sSearch !== "" ) {
1044
- query . $or = [
1045
- { comment : { $regex : new RegExp ( `.*${ params . qstring . sSearch } .*` , 'i' ) } } ,
1046
- { email : { $regex : new RegExp ( `.*${ params . qstring . sSearch } .*` , 'i' ) } } ,
1047
- ] ;
1044
+ query . $text = { $search : params . qstring . sSearch } ;
1048
1045
}
1049
1046
if ( params . qstring . iSortCol_0 ) {
1050
1047
try {
@@ -1426,6 +1423,9 @@ function uploadFile(myfile, id, callback) {
1426
1423
common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1427
1424
"ts" : 1
1428
1425
} , function ( ) { } ) ;
1426
+ common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1427
+ comment : 'text' , email : 'text'
1428
+ } , ( ) => { } ) ;
1429
1429
} ) ;
1430
1430
plugins . register ( "/i/apps/delete" , function ( ob ) {
1431
1431
var appId = ob . appId ;
@@ -1468,6 +1468,9 @@ function uploadFile(myfile, id, callback) {
1468
1468
common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1469
1469
"ts" : 1
1470
1470
} , function ( ) { } ) ;
1471
+ common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1472
+ comment : 'text' , email : 'text'
1473
+ } , ( ) => { } ) ;
1471
1474
} ) ;
1472
1475
common . db . collection ( "events" + crypto . createHash ( 'sha1' ) . update ( "[CLY]_star_rating" + appId ) . digest ( 'hex' ) ) . drop ( function ( ) { } ) ;
1473
1476
if ( common . drillDb ) {
@@ -1487,6 +1490,9 @@ function uploadFile(myfile, id, callback) {
1487
1490
common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1488
1491
"ts" : 1
1489
1492
} , function ( ) { } ) ;
1493
+ common . db . collection ( 'feedback' + appId ) . ensureIndex ( {
1494
+ comment : 'text' , email : 'text'
1495
+ } , ( ) => { } ) ;
1490
1496
} ) ;
1491
1497
common . db . collection ( "events" + crypto . createHash ( 'sha1' ) . update ( "[CLY]_star_rating" + appId ) . digest ( 'hex' ) ) . drop ( function ( ) { } ) ;
1492
1498
if ( common . drillDb ) {
0 commit comments