Renamed deprecated requireGlobal actor filter property. Fixed actor search wildcard expansion returning no manticore results for name components under 3 characters.

This commit is contained in:
2026-07-13 00:49:15 +02:00
parent d745b10d24
commit ff2d4eefb5

View File

@@ -408,7 +408,8 @@ async function queryManticoreSql(filters, options, _reqUser) {
builder.where('id', Number(escape(filters.query.slice(1))));
}
else {
builder.whereRaw(`match('@(name,aliases) :query:${filters.query.charAt(0) === '=' ? '' : '*'}', actors)`, { query: escape(filters.query) });
// manticoresearch has min_prefix_length set to 3, meaning wildcarded names under 3 characters return nu results
builder.whereRaw(`match('@(name,aliases) :query:${filters.query.charAt(0) === '=' || filters.query.split(/\s+/).at(-1)?.length < 3 ? '' : '*'}', actors)`, { query: escape(filters.query) });
}
}
@@ -416,7 +417,7 @@ async function queryManticoreSql(filters, options, _reqUser) {
builder.where('alias_for', 0);
}
if (filters.requireGlobal) {
if (filters.isGlobal) {
builder.where('entity_id', 0);
}