Facet Value Search
GETOverview
Section titled “Overview”Facet Value Search lets you search inside a single facet’s values instead of searching the full catalog. It is useful when a facet contains many options and the standard facet list is not enough.
The endpoint processes facet_q against the facet given in facets and returns only matching facet values with their hit counts.
Make sure your catalog is indexed before using this endpoint. See Indexing for setup details.
Request parameters
Section titled “Request parameters”Required parameters
Section titled “Required parameters”| Parameter | Description |
|---|---|
tracker_id | Your Luigi’s Box site identifier. |
facet_q | User input used to search within facet values. |
facets | Name of the facet to search within, for example brand. |
Optional parameters
Section titled “Optional parameters”This endpoint supports most optional parameters from the standard Search API, which lets you keep the same search context while searching within facet values.
To get correct results, always include the user’s original q and any active f[] filters. Without the current search context, facet counts may be misleading or irrelevant.
Request headers
Section titled “Request headers”| Header | Value | Required | Description |
|---|---|---|---|
Accept-Encoding | gzip, deflate | Recommended | Enables compressed responses. |
How to Make a Request
Section titled “How to Make a Request”Send a GET request to the endpoint, pass tracker_id, the facet you want to search in, the user’s facet_q, and the current search context.
For step-by-step integration guidance, see Quickstart: Search.
HTTP Response
Section titled “HTTP Response”Response format
Section titled “Response format”The response is a JSON object containing the results of the facet value search.
Results fields
Section titled “Results fields”| Field | Description |
|---|---|
query | Original search query from q. |
corrected_query | Corrected query if Luigi’s Box changed it, otherwise null. |
facet_value_query | Query used to search within facet values. |
filters | Filters applied to the search context. |
filters_negative | Negative filters applied to the search context. |
facets | Requested facet and the matching values. |
Facet object fields
Section titled “Facet object fields”| Field | Description |
|---|---|
name | Name of the facet, for example brand. |
type | Facet type, for example text, float, or date. |
values | Matching facet values. |
Facet value fields
Section titled “Facet value fields”| Field | Description |
|---|---|
value | The facet value itself, for example Yamaha. |
hits_count | Number of matching items for that value within the current search context. |
Error handling
Section titled “Error handling”The API uses standard HTTP status codes to indicate success or failure.
| HTTP Status | Description |
|---|---|
200 OK | The request succeeded and results are returned. |
400 Bad Request | The request was malformed — missing parameters or invalid facet count. |
404 Not Found | The tracker_id does not match any known catalog. |
500 Server Error | Internal error. If persistent, contact support. |
504 Gateway Timeout | The request took too long to process. Retrying may succeed. |
Was this page helpful?
Thanks.