NAME
Typesense::Client::Overrides - curation: pinning and hiding results
SYNOPSIS
# For "black friday", put document 1024 first and hide 512.
$ts->overrides->put('products', 'bf-promo', {
rule => { query => 'black friday', match => 'exact' },
includes => [ { id => '1024', position => 1 } ],
excludes => [ { id => '512' } ],
effective_from_ts => 1793491200,
effective_to_ts => 1793923200,
});
DESCRIPTION
An override is a merchandising rule: for a given query, force certain documents to certain positions, or remove them. It applies on top of the ranking, so the rest of the results keep their normal order.
The window fields effective_from_ts and effective_to_ts make a campaign expire on its own, which is what you want for anything seasonal - nobody has to remember to take it down.
METHODS
list
GET /collections/{c}/overrides.
get
GET /collections/{c}/overrides/{id}.
put
PUT /collections/{c}/overrides/{id}. Creates or replaces. The body holds rule (with query and match, or filter_by), plus includes, excludes, filter_by, sort_by, replace_query and the two effective_*_ts fields.
delete
DELETE /collections/{c}/overrides/{id}. Not an error if absent.
SEE ALSO
AUTHOR
SeHarrys
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by SeHarrys.
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.