SearchConfig
Interface
What a browser needs to query Lynkow search directly, without going through your server.
Returned by lynkow.search.getConfig().
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Tenant token (JWT) valid for 1 hour, limited to this site's records. |
|
| No | Base URL of Lynkow search for browser queries. Pass it verbatim as the search client's host. |
|
| No | Name of the site's search index, |
SearchHit
Interface
One search result. A hit is an article or, when the site opts commerce into search, a
product, product category or product collection: check type. A commerce hit carries at
most id, type, slug, path, title, description, image and the locale fields,
never a price or a stock level. Every field is optional: the profile's displayed fields
and the site's indexed fields decide which ones come back.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | The hit's fields with |
|
| Yes | Indexed author's full name when selected. Empty string when no author<br>name is available; no default author is substituted. |
|
| Yes | Selected category projections. Empty array when no categories are assigned.<br>Names require |
|
| Yes | Commerce hits only: the product's, category's or collection's description when<br>selected, or |
|
| Yes | Indexed excerpt when selected. Empty string if no excerpt is set;<br>no summary is generated from the body. |
|
| Yes | Indexed featured image URL when selected, or |
|
| Yes | Hit identifier when selected by the profile's displayed fields: the content<br>UUID for an article, or the public prefixed id of a commerce hit ( |
|
| Yes | Commerce hits only: a public image URL when selected (a product's first gallery<br>image, a category's or collection's own image), or |
|
| Yes |
|
|
| Yes | Locale the hit is served in, such as |
|
| Yes | Indexed SEO description when selected. Empty string if unset;<br>apply an excerpt fallback in your UI when needed. |
|
| Yes | Indexed SEO title when selected. Empty string if no override is set;<br>apply a title fallback in your UI when needed. |
|
| Yes | Public URL path when selected: including locale and category prefixes for an<br>article (e.g. |
|
| Yes | Publication Unix timestamp in seconds when selected, or |
|
| Yes | The locale the search asked for (the |
|
| Yes | URL-safe slug when selected: unique within the site and locale for an article,<br>or the product's, category's or collection's own slug for a commerce hit (the<br>one its |
|
| Yes | Selected tag projections. Empty array when no tags are assigned.<br>Names require |
|
| Yes | Indexed title when selected: the content title in the searched locale, the<br>product or collection title, or a product category's name.<br>See |
|
| Yes | Hit kind when selected. For an article, its stored content type, with<br> |
|
| Yes | Last update Unix timestamp in seconds when selected, or |
SearchOptions
Interface
Options for lynkow.search.search() and lynkow.search.searchByProfile(). All are
optional. The inherited fallback: false leaves out the hits served in another locale
than the requested one.
Extends: BaseRequestOptions
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Filter by category slug (e.g. |
|
| Yes | Set |
|
| Yes |
|
|
| Yes | Results per page. Defaults to the profile's |
|
| Yes | Locale to search in, such as |
|
| Yes | Id ( |
|
| Yes | Page number, counted from 1. Defaults to |
|
| Yes | Filter by tag slug (e.g. |
SearchProfilePublic
Interface
A public search profile, as returned by lynkow.search.listProfiles(): a search scope with
its own fields, facets, sort and limits over the site's one search index.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Page size used when the request sends no |
|
| No | What the profile covers, as written in the admin. |
|
| No | Fields the profile returns. Pass verbatim as |
|
| No | Fields you can facet on, such as |
|
| No | The profile's scope as a filter expression, to pass verbatim as the |
|
| No | Largest |
|
| No | Display name the site administrator gave the profile. |
|
| No | Fields the profile searches. Pass verbatim as |
|
| No | Profile identifier, such as |
|
| No | Default sort, such as |
SearchResponse
Interface
Response from lynkow.search.search() and lynkow.search.searchByProfile(): one page of
hits and its paging metadata.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Hits of the current page, ordered by relevance. Empty array when nothing matches. |
|
| No | Paging and query metadata. Its keys differ from PaginationMeta: |