From b80ead37a6159747524eec058960270d5310edaf Mon Sep 17 00:00:00 2001
From: Jai Radhakrishnan <55522316+jairad26@users.noreply.github.com>
Date: Sun, 29 Sep 2024 14:53:55 -0700
Subject: [PATCH] update collections docs with getLabels
---
 sdk/collections.mdx                           | 29 +++++++++++++++++++
 styles/config/vocabularies/general/accept.txt |  1 +
 2 files changed, 30 insertions(+)
diff --git a/sdk/collections.mdx b/sdk/collections.mdx
index 0ed9125d..6c1eaeee 100644
--- a/sdk/collections.mdx
+++ b/sdk/collections.mdx
@@ -423,6 +423,34 @@ collections.getVector(
   An optional namespace to associate with the item.
 
 
+#### getLabels
+
+Get the labels for an item in a collection.
+
+
+
+```ts AssemblyScript
+collections.getLabels(
+  collection: string,
+  key: string,
+  namespace: string = "",
+): string[]
+```
+
+
+
+
+  Name of the collection, as [defined in the manifest](../define-collections).
+
+
+
+  The key of the item to retrieve.
+
+
+
+  An optional namespace to associate with the item.
+
+
 ### Maintenance Functions
 
 #### recomputeSearchMethod
@@ -550,6 +578,7 @@ class CollectionSearchResultObject {
   namespace: string;
   key: string;
   text: string;
+  labels: string[];
   distance: f64;
   score: f64;
 }
diff --git a/styles/config/vocabularies/general/accept.txt b/styles/config/vocabularies/general/accept.txt
index 70b7f50e..4201d12e 100644
--- a/styles/config/vocabularies/general/accept.txt
+++ b/styles/config/vocabularies/general/accept.txt
@@ -31,3 +31,4 @@ UUID
 nnClassify
 serverless
 getVector
+getLabels