Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions sdk/collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,34 @@ collections.getVector(
An optional namespace to associate with the item.
</ResponseField>

#### getLabels

Get the labels for an item in a collection.

<CodeGroup>

```ts AssemblyScript
collections.getLabels(
collection: string,
key: string,
namespace: string = "",
): string[]
```

</CodeGroup>

<ResponseField name="collection" type="string" required>
Name of the collection, as [defined in the manifest](../define-collections).
</ResponseField>

<ResponseField name="key" type="string" required>
The key of the item to retrieve.
</ResponseField>

<ResponseField name="namespace" type="string">
An optional namespace to associate with the item.
</ResponseField>

### Maintenance Functions

#### recomputeSearchMethod
Expand Down Expand Up @@ -550,6 +578,7 @@ class CollectionSearchResultObject {
namespace: string;
key: string;
text: string;
labels: string[];
distance: f64;
score: f64;
}
Expand Down
1 change: 1 addition & 0 deletions styles/config/vocabularies/general/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ UUID
nnClassify
serverless
getVector
getLabels