Column-oriented indexing for fast filtering, sorting, and aggregates
By default, all non-text and non-JSON fields are indexed using ParadeDB’s columnar format.
This enables fast filtering pushdown, Top K ordering, and
aggregates over these fields. For example, in the following index definition, rating and id are columnar indexed
because they are integers, whereas description is not because it is text.
CREATE INDEX search_idx ON mock_itemsUSING bm25 (id, description, rating)WITH (key_field = 'id');
import { indexing } from "@paradedb/drizzle-paradedb";indexing .bm25Index("search_idx") .on(mockItems.id, mockItems.description, mockItems.rating);
The columnar option for tokenizers is available in versions 0.22.0 and
above.
Columnar defaults to false for all tokenizers besides literal and
literal normalized, which default to
true and do not require an explicit setting.The reason is that tokenized fields can represent large documents and would be expensive to store column-wise,
whereas literal and literal normalized fields are typically single-value and much more compact.
The columnar field stores the raw text value regardless of the tokenizer. For example, if Hello world is
split into tokens hello and world, the columnar value remains Hello world.This is important because operations like filtering and sorting require the original field value, not the tokens.
Internally, Tantivy refers to columnar fields as fast fields. Our legacy
docs also refer to these fields as fast.