I'm working with some dynamic attributes in a product catalog, indexed under one field (similar to this). A simple example would look like this:
{id: 1, DYN_ATT:Color||Green, DYN_ATT:Size||Small}
{id: 2, DYN_ATT:Color||Red, DYN_ATT:Size||Small}
{id: 3, DYN_ATT:Color||Green, DYN_ATT:Size||Small}
{id: 4, DYN_ATT:Color||Red, DYN_ATT:Size||Large}
However, it seems to be impossible to enable multi-select as if these are all different facets.
For example, say the user selects the Green
Color facet in the UI:
[ ]Red
[ ]Green
----------
[ ]Small
[ ]Large
The resulting facets should show all possible values for Color
(to allow the user to select Red
OR Green
. But should filter the Size
facet based on Green
being selected in another (logical) facet.
[ ]Red
[x]Green
----------
[ ]Small
Is there any way to do this? I haven't found any answers and suspect a different approach may be needed. Unfortunately the types of attributes in the data vary wildly.
Neither of these work:
fq={!tag=DYNTAG}DYN_ATT:"Color||Green"&facet.field={!ex=DYNTAG}DYN_ATT
This yields too many results for Size
. A facet for [ ]Large
should NOT be available, but would be returned. If the user selects it, the two filters would be disjoint and yield no results.
fq={!tag=DYNTAG}DYN_ATT:"Color||Green"&facet.field=DYN_ATT
This yields too few results, excluding Red
from facets, so the user would NOT be able to multi-select on Color:
[x]Red
[x]Green
Any ideas?