Merge remote-tracking branch 'upstream/qdrant-search-2' into spc2

This commit is contained in:
Moon Man 2024-05-23 14:56:02 +00:00
commit 2b18b2c5bd
2 changed files with 3 additions and 3 deletions

View File

@ -71,9 +71,9 @@ defp build_search_payload(embedding, options) do
offset: options[:offset] || 0 offset: options[:offset] || 0
} }
if options[:actor] do if author = options[:author] do
Map.put(base, :filter, %{ Map.put(base, :filter, %{
must: [%{key: "actor", match: %{value: options[:actor].ap_id}}] must: [%{key: "actor", match: %{value: author.ap_id}}]
}) })
else else
base base

View File

@ -98,7 +98,7 @@ test "for a given actor, ask for only relevant matches" do
end) end)
results = results =
QdrantSearch.search(nil, "guys i just don't wanna leave the swamp", %{actor: user}) QdrantSearch.search(nil, "guys i just don't wanna leave the swamp", %{author: user})
assert results == [activity] assert results == [activity]
end end