mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Augment tag searching to consider all ItemValues
This commit is contained in:
parent
a455e580be
commit
f0376cdad9
@ -2461,7 +2461,9 @@ namespace Emby.Server.Implementations.Data
|
||||
if (query.SearchTerm.Length > 1)
|
||||
{
|
||||
builder.Append("+ ((CleanName like @SearchTermContains or (OriginalTitle not null and OriginalTitle like @SearchTermContains)) * 10)");
|
||||
builder.Append("+ ((Tags not null and Tags like @SearchTermContains) * 5)");
|
||||
builder.Append("+ (SELECT COUNT(1) * 1 from ItemValues where ItemId=Guid and CleanValue like @SearchTermContains)");
|
||||
builder.Append("+ (SELECT COUNT(1) * 2 from ItemValues where ItemId=Guid and CleanValue like @SearchTermStartsWith)");
|
||||
builder.Append("+ (SELECT COUNT(1) * 10 from ItemValues where ItemId=Guid and CleanValue like @SearchTermEquals)");
|
||||
}
|
||||
|
||||
builder.Append(") as SearchScore");
|
||||
@ -2492,6 +2494,11 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
statement.TryBind("@SearchTermContains", "%" + searchTerm + "%");
|
||||
}
|
||||
|
||||
if (commandText.Contains("@SearchTermEquals", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
statement.TryBind("@SearchTermEquals", searchTerm);
|
||||
}
|
||||
}
|
||||
|
||||
private void BindSimilarParams(InternalItemsQuery query, IStatement statement)
|
||||
|
Loading…
x
Reference in New Issue
Block a user