Petran
Petran

Reputation: 8067

PgVector Active Record support

I was successfully added a vector field on my database

create_table :scraped_documents do |t|
    t.references :client, null: false, foreign_key: true
    t.column     :embedding, :vector, limit: 1536
    t.text       :content
    t.timestamps
 end

Now when I check the Model I get the following

ScrapedDocument.first
unknown OID 42268: failed to recognize type of 'embedding'. It will be treated as String.

How can I make the ActiveRecord to understand the vector column in order to do similarity search to my model?

Upvotes: 0

Views: 72

Answers (0)

Related Questions