Skip to content

Commit

Permalink
#160 and #161: documented the facet endpoint's new sort parameter (no…
Browse files Browse the repository at this point in the history
…n-semantic facets only).
  • Loading branch information
brent-hartwig committed Jun 6, 2024
1 parent 34aa907 commit 5b51859
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/lux-backend-api-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ If unable to calculate the facet, an error is thrown. This includes when the sys
| `scope` | `agent` | **CONDITIONALLY REQUIRED** - The scope to apply to the query. Only required when a) using the LUX String Search Grammar or b) using the LUX JSON Search Grammar but not setting the `_scope` property. The value of the `scope` parameter is given precedence over the LUX JSON Search Grammar `_scope` property value. For a complete list of available search scopes, please review the return of the [Search Info endpoint](#search-info), specifically the `searchBy` response body property. |
| `page` | 1 | **OPTIONAL** - The starting page. Defaults to 1. An error will be thrown if this value is less than 1.|
| `pageLength` | 10 | **OPTIONAL** - The number of results per page. The default is 20. The maximum is 100. An error will be thrown if this value is less than 1. |
| `sort` | `asc` | **OPTIONAL** - By default, facet values are sorted by the *number of times* (frequency) the value appears in the search results, in descending order. This works well for string facet values, but not facets with numeric or date ranges, where it makes more sense to sort by the facet's *values*. To sort by facet value, set this parameter's value to `asc` for ascending or `desc` for descending. At present, this parameter is only implemented for non-semantic facets; semantic facets are only sorted by frequency. |

### Successful Request / Response Example

Expand Down

0 comments on commit 5b51859

Please sign in to comment.