-
Notifications
You must be signed in to change notification settings - Fork 10
View Facet Validation
This is an extension to the core validation spec.
The field
and concept
properties are mutually exclusive since they may represent two different sets of data. If both are defined an error will occur.
The sort direction of the data in ascending (asc
) or descending (desc
) order
The index/position for the sort. This defines when the sort is applied for the facet. For example, the below facet list would display Color, Shape, and Texture data (in that order) sorted by Texture then by Color:
[{
'field': 'store.product.color',
'sort': 'desc',
'sort_index': 1
}, {
'field': 'store.product.shape'
}, {
'field': 'store.product.texture',
'sort': 'asc',
'sort_index': 0
}]
If a sort
direction, but no sort_index
is specified for a facet, they are applied (in order) after all other explicitly defined sorts. For example, the below list would sort first by Shape then by Color then by Texture:
[{
'field': 'store.product.color',
'sort': 'asc'
}, {
'field': 'store.product.shape',
'sort': 'asc',
'sort_index': 0
}, {
'field': 'store.product.texture',
'sort': 'desc'
}]
-
FACET_NOT_ORDERABLE
- The facet cannot be ordered.
-
FIELD_XOR_CONCEPT_REQUIRED
- If both a
field
andconcept
are defined, this error will be returned denoting only one of the two may be defined.
- If both a
{
'concept': 4,
'sort': 'desc',
'sort_order': 0,
'language': 'Pure Tone Average (PTA)'
}
Simply a list of facets.
[{
'concept': 4,
'sort': 'desc',
'sort_index': 0,
'language': 'Pure Tone Average (PTA)'
}, {
...
}]
Contents
- Introduction
- Installation & Setup
- Getting Started
- What Next?
Guides
- Managing your metadata
- Persisting sets of objects
- Writing a custom Interface
- Writing a custom Formatter
- Cookbook
APIs
Proposals
Reference
Developers