N8n pgvector Metadata Filter allowing $gt $gte $lt $lte operators

Hello, I would like to know if the node Postgres PGVector Store integrations | Workflow automation with n8n accepts special filter on the metadata field, currently I’m only able to use it to filter simple equality, example:

price: 500

I would like to use filters like:

price: {“$gte”: 500, “$lte”: 1000}

How to do it?

From what I see in the code, and from sniffing the traffic, currently the filter is built around eq operator, which means that it will search for the exact value, where for the filter created like so:

it will produce the query:

      SELECT *, "embedding" <=> $1 as "_distance"
      FROM n8n_vectors
      WHERE metadata->>'price' = $3
      ORDER BY "_distance" ASC
      LIMIT $2;

Feel free to open a FR for other operators, if one doesn’t exist yet.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.