From fe3091dfa1893c33e0f0e1414eb9edac00415f16 Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Fri, 5 Jun 2026 15:32:47 +1000 Subject: [PATCH 1/6] Update search3.md rules for `query` parameters --- content/en/docs/Endpoints/search3.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index 39b37a88..6ae13ef5 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -32,6 +32,18 @@ Music is organized according to ID3 tags. Servers must support an **empty query** and return all the data to allow clients to properly access all the media information for offline sync. {{< /alert >}} +{{< alert color="warning" title="OpenSubsonic" >}} +OpenSubsonic servers **must accomodate** the following rules for `query` parameters: + +* Search only for `name`/`title` for each object being searched + * e.g. Search album name when searching for albums, not album artist +* Match on any word individually +* Words are `like` matched on the end of each string + * e.g. `plast ci` is the same as searching `plastic city` +* Group words by using `+` to join spaces or wrap strings in quotes `"` +* Grouped words are exact match only + * e.g. `"plast ci"` will not match the album "plastic city" + ### Example {{< alert color="primary" >}} `http://your-server/rest/search3.view?u=demo&p=demo&v=1.13.0&c=AwesomeClientName&f=json&query=""&artistCount=1&albumCount=1&songCount=1` {{< /alert >}} From 1ba67dcfef81996f628f6141d1082d474814636d Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Fri, 5 Jun 2026 15:35:02 +1000 Subject: [PATCH 2/6] Update search3.md --- content/en/docs/Endpoints/search3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index 6ae13ef5..da038544 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -43,6 +43,7 @@ OpenSubsonic servers **must accomodate** the following rules for `query` paramet * Group words by using `+` to join spaces or wrap strings in quotes `"` * Grouped words are exact match only * e.g. `"plast ci"` will not match the album "plastic city" +{{< /alert >}} ### Example From 44068c29ce0af32b0e9d9a4b7dbc8c9c66a2f4ae Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Fri, 5 Jun 2026 15:45:51 +1000 Subject: [PATCH 3/6] Update search3.md --- content/en/docs/Endpoints/search3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index da038544..090aaee1 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -41,6 +41,7 @@ OpenSubsonic servers **must accomodate** the following rules for `query` paramet * Words are `like` matched on the end of each string * e.g. `plast ci` is the same as searching `plastic city` * Group words by using `+` to join spaces or wrap strings in quotes `"` + * e.g. `plastic+city` is the same as `"plastic city"` * Grouped words are exact match only * e.g. `"plast ci"` will not match the album "plastic city" {{< /alert >}} From 24feeaf70236785324fdf69af65f75224bc4b563 Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Mon, 8 Jun 2026 10:49:32 +1000 Subject: [PATCH 4/6] missing wildcard rules --- content/en/docs/Endpoints/search3.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index 090aaee1..034ead2f 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -38,7 +38,8 @@ OpenSubsonic servers **must accomodate** the following rules for `query` paramet * Search only for `name`/`title` for each object being searched * e.g. Search album name when searching for albums, not album artist * Match on any word individually -* Words are `like` matched on the end of each string +* Wildcard (`like`) match on `*` and consider strings joined by `*` as one word +* Individual words are `like` matched on the end of each string * e.g. `plast ci` is the same as searching `plastic city` * Group words by using `+` to join spaces or wrap strings in quotes `"` * e.g. `plastic+city` is the same as `"plastic city"` From e365c08b24d873c5eda8fff6f8b5b6736fd79610 Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Mon, 8 Jun 2026 11:06:22 +1000 Subject: [PATCH 5/6] also include % and note that groups strings are considered literal --- content/en/docs/Endpoints/search3.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index 034ead2f..af923daa 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -38,13 +38,15 @@ OpenSubsonic servers **must accomodate** the following rules for `query` paramet * Search only for `name`/`title` for each object being searched * e.g. Search album name when searching for albums, not album artist * Match on any word individually -* Wildcard (`like`) match on `*` and consider strings joined by `*` as one word +* Wildcard (`like`) match on `*` and `%` characters and consider strings joined by these characters as one word * Individual words are `like` matched on the end of each string * e.g. `plast ci` is the same as searching `plastic city` * Group words by using `+` to join spaces or wrap strings in quotes `"` * e.g. `plastic+city` is the same as `"plastic city"` * Grouped words are exact match only * e.g. `"plast ci"` will not match the album "plastic city" +* Wildcard characters inside groups are considered literal + * e.g. `"100%"` will not match `100% (The Tenth Stage Remix)` {{< /alert >}} ### Example From fcca15da98399ad778af37312a2343fbf057bd5f Mon Sep 17 00:00:00 2001 From: Lachlan de Waard Date: Mon, 8 Jun 2026 15:55:14 +1000 Subject: [PATCH 6/6] rewrite it a bit looser by default allows you to provide other options --- content/en/docs/Endpoints/search3.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index af923daa..543066be 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -33,20 +33,16 @@ Servers must support an **empty query** and return all the data to allow clients {{< /alert >}} {{< alert color="warning" title="OpenSubsonic" >}} -OpenSubsonic servers **must accomodate** the following rules for `query` parameters: +By default OpenSubsonic servers **must accomodate** the following rules for `query` parameters: -* Search only for `name`/`title` for each object being searched - * e.g. Search album name when searching for albums, not album artist -* Match on any word individually -* Wildcard (`like`) match on `*` and `%` characters and consider strings joined by these characters as one word -* Individual words are `like` matched on the end of each string - * e.g. `plast ci` is the same as searching `plastic city` -* Group words by using `+` to join spaces or wrap strings in quotes `"` - * e.g. `plastic+city` is the same as `"plastic city"` -* Grouped words are exact match only - * e.g. `"plast ci"` will not match the album "plastic city" -* Wildcard characters inside groups are considered literal - * e.g. `"100%"` will not match `100% (The Tenth Stage Remix)` +* Search only by `name`/`title` for the object type +* Prefix match (starts with) by default for all search terms +* Split all words by space (` `) into individual (**OR**) search terms +* Wrap multiple words with quotes (`"`) to group them together +* Join multiple words with plus (`+`) to group them together +* Group search terms are **EXACT** matched by default +* Group search terms ending with `*`|`%` are prefix matched (**LIKE**) +* Special characters (`*`|`%`) inside group strings are literal {{< /alert >}} ### Example