[Q&A] What should the key_field be for a partitioned table?
#4005
What happens?Let's say I have the following table: create table logging.logs (
timestamp timestamptz not null,
uuid uuid not null,
data jsonb,
primary key (timestamp, uuid)
) partitioned by range (timestamp);When creating a BM25 index, what field should be used as the SELECT id, description, rating, category
FROM mock_items
WHERE id @@@ pdb.more_like_this(3)
ORDER BY id;Look like when the table is partitioned and the To ReproduceN/A OS:Debian GNU/Linux 12 (bookworm) ParadeDB Version (e.g. output of
|
Replies: 1 comment 1 reply
|
This is one of the rough edges in our current API. Currently you must set a unique field as There is a PR I've written (#3807) which fixes this, it's a fairly large change but I'm hopeful we will be able to merge it soon. In this new world you don't set |
This is one of the rough edges in our current API.
Currently you must set a unique field as
key_fieldfor BM25, but in a temporal table such as this the PK istimestamp,uuid. You could just useuuid- but obviously this isn't correct (although it will work in most places, MLK above is one it won't).There is a PR I've written (#3807) which fixes this, it's a fairly large change but I'm hopeful we will be able to merge it soon. In this new world you don't set
key_field, it just infers it (including a composite column value) from your unique indexes.