Buries

Take the documents matching certain criteria down the list without excluding them: the counterpart of a boost. Where a boost lifts the documents its filter holds and lowers everything else to make room, a bury lowers only the documents its filter holds; nothing else moves. Buries must be created after Load() completes.

Creating Buries

csharp
// BuryStrength enum: Low = 1, Med = 2, High = 3
Filter discontinued = engine.CreateValueFilter("status", "discontinued", out _)!;

Bury b = engine.CreateBury(discontinued, BuryStrength.High, out _)!;
Console.WriteLine(
quot;Documents buried: {b.DocumentsBuried}"); query.Ranking.Buries = new[] { b }; // a list that is not empty is on

CreateBury returns null, with the reason in its out argument, for a null filter or a strength that is not Low, Med or High. Over HTTP the same is a 400 invalidArgument, from buries/from-filter and from a search's ranking.buries.

Each strength point takes a buried document down by 1/255 of the score range, divided by the reranker's share as a boost is. A document taken below the bottom lands on the floor of the range and stays in the list; nothing wraps. A search whose buries' strengths sum past 255 is refused with a Reason, as a search with too many boosts is.

In an empty search (no text, EnableFacets) every document starts at the buries' sum, so a buried document scores below the rest and still appears.

Boosts and buries together

Both can be on in one search. A document in a boost filter and a bury filter is lifted by the one and lowered by the other; the net is the sum. Ranking.Boosts and Ranking.Buries are separate lists, so a search can bury without boosting.

Without reranking (Ranking.Rerank = false on a text search, in either mode) buries, like boosts, have no effect.

Properties

NameTypeAccessDescription
BuryStrength
BuryStrength
get/set
How far the documents are taken down.
DocumentsBuried
int
get
The number of documents buried.
Filter
Filter
get/set
The filter that says which documents are buried.

BuryStrengthenum

How far a bury takes a document down: the same three steps a boost lifts by, each 1/255 of the score range.

NameValue
Low
1
Med
2
High
3