SearchIndexContext
Defined in: builder/search.ts:6
Methods
Section titled “Methods”email()
Section titled “email()”email(
key):this
Defined in: builder/search.ts:12
Utility function that configures an email facet as email:normalized-email.
Additionally emailDomain:normalized-domain.
If the supplied string is not an email, it will be ignored.
Parameters
Section titled “Parameters”string | undefined
Returns
Section titled “Returns”this
facet()
Section titled “facet()”facet(
key):this
Defined in: builder/search.ts:25
Configures a facet, which is typically normalized in the format key:value, such as email:jon@pynhq.com — however any string within the range limits is accepted. The string is automatically trimmed of leading and lagging whitespace. The trimmed string must be 1-256 characters long inclusive.
Supports undefined for convenience. Undefined and empty (zero length or all whitespace) strings are ignored.
Parameters
Section titled “Parameters”string | undefined
Returns
Section titled “Returns”this
text()
Section titled “text()”text(
text,weight?):this
Defined in: builder/search.ts:37
Adds text to the context for this item. This can be called multiple times to concatenate multiple texts. The overall result is limited to 16kB.
Supports undefined for convenience. Undefined and empty (zero length or all whitespace) strings are ignored.
Parameters
Section titled “Parameters”string | undefined
weight?
Section titled “weight?”25 | 50 | 75 | 100
the weight to apply to this text. If none is supplied it’s the lowest default.
Returns
Section titled “Returns”this
uuid()
Section titled “uuid()”uuid(
key):this
Defined in: builder/search.ts:43
Utility function that configures a UUID facet as uuid:normalized-uuid.
If the supplied string is not a valid UUID, it will be ignored.
Parameters
Section titled “Parameters”string | { id: string; } | undefined
Returns
Section titled “Returns”this