feat: Full Text Search Support (#3904)
* Full Text Support * invalid input test * Support for sort * index exist test * clean up * better error messaging * postgres support * error instructions for $diacritic and $case sensitivity * nit * nit * nit * separate test for full text
This commit is contained in:
committed by
Florent Vilmart
parent
5f991e90fb
commit
8b21d5ab80
@@ -94,7 +94,9 @@ function RestQuery(config, auth, className, restWhere = {}, restOptions = {}, cl
|
||||
var fields = restOptions.order.split(',');
|
||||
this.findOptions.sort = fields.reduce((sortMap, field) => {
|
||||
field = field.trim();
|
||||
if (field[0] == '-') {
|
||||
if (field === '$score') {
|
||||
sortMap.score = {$meta: 'textScore'};
|
||||
} else if (field[0] == '-') {
|
||||
sortMap[field.slice(1)] = -1;
|
||||
} else {
|
||||
sortMap[field] = 1;
|
||||
|
||||
Reference in New Issue
Block a user