Skip to content

QueryLookup

What a search clause can look up in order to narrow the rows that it has to check. It is read only.

ancestors(id): string[];

Lists the rows above a row.

Parameter Type Description
id string the id of the row

string[]

the ids of the ancestors, nearest first


index(facet, path):
| {
entries(): [string | number | boolean, string[]][];
eq(value): string[];
prefix(prefix): string[];
range(lo, hi): string[];
under(path): string[];
}
| undefined;

Returns the index of one path of a facet, which finds rows by the value of that path without checking every row. It exists only when the facet declares that path in its paths.

Parameter Type Description
facet Pick<FacetRef<unknown>, "key"> the facet
path string the path inside the value, where . designates the whole value

| { entries(): [string | number | boolean, string[]][]; eq(value): string[]; prefix(prefix): string[]; range(lo, hi): string[]; under(path): string[]; } | undefined

the index, or undefined when the facet does not declare that path


text(words): string[];

Finds the rows whose text contains the given words.

Parameter Type Description
words readonly string[] the words to look for

string[]

the ids of the rows