Skip to content

Commit

Permalink
Fix create index
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel committed Dec 1, 2024
1 parent 04a7ade commit 16c7d1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
14 changes: 3 additions & 11 deletions charts/paradedb/test/paradedb-enterprise/02-paradedb_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,9 @@ spec:
schema_name => 'public',
table_name => 'mock_items'
);
CALL paradedb.create_bm25(
index_name => 'search_idx',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description') || paradedb.field('category'),
numeric_fields => paradedb.field('rating'),
boolean_fields => paradedb.field('in_stock'),
datetime_fields => paradedb.field('created_at'),
json_fields => paradedb.field('metadata'),
range_fields => paradedb.field('weight_range')
);
CREATE INDEX search_idx ON mock_items
USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range)
WITH (key_field='id');
EOSQL
RESULT=$(psql "$DB_URI" -t) <<-EOSQL
SELECT description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,7 @@ spec:
schema_name => 'public',
table_name => 'mock_items'
);
CALL paradedb.create_bm25(
index_name => 'search_idx',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description') || paradedb.field('category'),
numeric_fields => paradedb.field('rating'),
boolean_fields => paradedb.field('in_stock'),
datetime_fields => paradedb.field('created_at'),
json_fields => paradedb.field('metadata'),
range_fields => paradedb.field('weight_range')
);
CREATE INDEX search_idx ON mock_items
USING bm25 (id, description, category, rating, in_stock, created_at, metadata, weight_range)
WITH (key_field='id');
EOSQL

0 comments on commit 16c7d1f

Please sign in to comment.