From 9c0a6dd3ffc48dd3d824d8b42ba25eb82b7cf6c2 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Thu, 16 Nov 2023 19:24:32 +0300 Subject: [PATCH] Update api/api/docs/base_docs.py Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com> --- api/api/docs/base_docs.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/api/api/docs/base_docs.py b/api/api/docs/base_docs.py index 92a3f9637e9..9109647dd78 100644 --- a/api/api/docs/base_docs.py +++ b/api/api/docs/base_docs.py @@ -140,11 +140,25 @@ def get_collection_description(media_type, collection): return f""" Get a collection of {media_type} with a specific tag. -This endpoint returns only the exact matches, case-insensitive matches for the -specified tag. For example, 'birds' and 'birding' are not matches for 'bird'. -To search within the tag values, or to match several tags, use the `search` endpoint -with `tags` query parameter instead of `q` parameter. In this case, the matches will - not be exact, so 'cat' would match both 'cat' and 'cats'. +This endpoint matches a single tag, exactly and entirely. + +Differences that will cause tags to not match are: +- upper and lower case letters +- diacritical marks +- hyphenation +- spacing +- multi-word tags where the query is only one of the words in the tag +- multi-word tags where the words are in a different order + +Examples of tags that **do not** match: +- "Low-Quality" and "low-quality" +- "jalapeƱo" and "jalapeno" +- "Saint Pierre des Champs" and "Saint-Pierre-des-Champs" +- "dog walking" and "dog walking" (where the latter has two spaces between the last two words, as in a typographical error) +- "runner" and "marathon runner" +- "exclaiming loudly" and "loudly exclaiming" + +For non-exact or multi-tag matching, using the `search` endpoint's `tags` query parameter. The returned results are ordered based on the time when they were added to Openverse. """