Skip to content

hybrid search with a Disjunction Max bm25 #1337

Answered by rebasedming
Oaklight asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! I just responded in Slack but I'll reply here as well.

I'm having trouble replicating. The following code works:

-- Create BM25 index over test table
CALL paradedb.create_bm25_test_table(
  schema_name => 'public',
  table_name => 'mock_items'
);

CALL paradedb.create_bm25(
    index_name => 'search_idx',
    schema_name => 'public',
    table_name => 'mock_items',
    key_field => 'id',
    text_fields => '{description: {tokenizer: {type: "en_stem"}}, category: {}}',
    numeric_fields => '{rating: {}}'
);

-- Create mock embeddings
ALTER TABLE mock_items ADD COLUMN embedding vector(3);
UPDATE mock_items m
SET embedding = ('[' ||
    ((m.id + 1) % 10 + 1)::integer || ',' ||
    ((m.id +

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Oaklight
Comment options

@philippemnoel
Comment options

@Oaklight
Comment options

Answer selected by philippemnoel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants