Skip to content

How to retrieve all possible values of an attribute in metadata #2721

Answered by djptek
OweysMomenzada asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @OweysMomenzada

I'd just like to update you on the availability of the facet api which might fulfil your requirement

Here is a brief example of how that works

PUT collections/test
{
  "vectors": {
    "size": 3,
    "distance": "Dot"
  }
}

PUT /collections/test/index
{
    "field_name": "name",
    "field_schema": "keyword"
}


PUT collections/test/points
{
  "points": [
    {
      "id": 1,
      "vector": [255,0,0],
      "payload": {
        "name": "RED"
      }
    },
    {
      "id": 2,
      "vector": [0,255,0],
      "payload": {
        "name": "GREEN"
      }
    },
    {
      "id": 3,
      "vector": [0,0,255],
      "payload": {
        "name": "BLUE"
      }
    }
  ]
…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by timvisee
Comment options

You must be logged in to vote
1 reply
@timvisee
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants