-
My use case is that I wish to randomly present a feed to each refresh by user for items in a certain collection, for example photos. Yet when user scroll down, this random generated feed should be stable and have no duplicates or few duplicates. Each refresh could generate a random seed, then this seed can be used for this search. I am not sure if it is an appropriate application of vector search. Any insight would be much appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @lanyusan, there are a couple of ways. If you know the res = client.search({query:0.0}, context={"tensor":[{"vector": context_vector, "weight": 1.0}]}) where |
Beta Was this translation helpful? Give feedback.
Hi @lanyusan, there are a couple of ways. If you know the
_id
list ahead of time you could randomly sample a document and then use that to search with. Alternatively, we have acontext_vector
that can be used for a random search. In this case, you would create a random vector and then search directly with that. Here is an example;where
context_vector
is a random vector.