Well I dont know if there are SQL people in these forums but, Supabase support is so bad, I’m resorting to trying to see if anyonein here know what this SQL filter isnt working from wewebs end.
Here is the SQL:
create or replace function action_description (
query_embedding vector (1536),
match_threshold float,
match_count int,
tasks bigint
) returns table (id bigint, similarity float, tasks bigint) language sql stable as $$
select
“Actions”.id,
1 - (“Actions”.description_embedding <=> query_embedding) as similarity,
“Actions”.tasks
from “Actions”
where 1 - (“Actions”.description_embedding <=> query_embedding) > match_threshold
and “Actions”.tasks = tasks
order by similarity desc
limit match_count;
$$;
Im wondering why, the line here - and “Actions”.tasks = tasks - Isnt sorting by the # given. For example, see the screen shot. The # is 97 that it should be sorting by, but its pulling in whatever matches and disregarding the and statement. Im looking at you @broberto fora a hail mary lol! Thanks guys!