Error: Can't use $diacriticSensitive with String.
File "/app/node_modules/mongoose/lib/schema/string.js", line 598, in SchemaString.castForQuery
throw new Error('Can\'t use ' + $conditional + ' with String.');
File "/app/node_modules/mongoose/lib/schematype.js", line 1216, in SchemaString.SchemaType.castForQueryWrapper
return this.castForQuery(params.$conditional, params.val);
File "/app/node_modules/mongoose/lib/cast.js", line 288, in cast
val[$cond] = schematype.castForQueryWrapper({
File "/app/node_modules/mongoose/lib/query.js", line 4340, in model.Query.Query.cast
return cast(model.schema, obj, {
File "/app/node_modules/mongoose/lib/query.js", line 2087, in model.Query.<anonymous>
this.cast(this.model);
File "/app/node_modules/mongoose/lib/helpers/query/wrapThunk.js", line 16, in model.Query._wrappedThunk [as _count]
fn.call(this, cb);
File "/app/node_modules/kareem/index.js", line 369, in process.nextTick
process.nextTick(() => fn.apply(this, arguments));
File "internal/process/next_tick.js", line 132, in _combinedTickCallback
File "internal/process/next_tick.js", line 219, in process._tickDomainCallback
when I do without the line $diacriticSensitive: false it works right but it is diacritic sensitive.
Also, Mongodb docs says that it defaults to diacritic insensitive and it is defaulting for diacritic sensitive for me.
I'm sorry, I am new to this and I am not sure this is the right place to post.
I am trying to do a diacritic insensitive search:
on the client:
Products hooks:
The error I get:
Mongodb: 3.6v feathers-mongodb-fuzzy-search: 1.1.1v
when I do without the line
$diacriticSensitive: false
it works right but it is diacritic sensitive. Also, Mongodb docs says that it defaults to diacritic insensitive and it is defaulting for diacritic sensitive for me.Any clue on what is going wrong?