[ADF-4083] search facetFields - empty spaced labels support (#4322)

* [ADF-4083] ignore wrapping quotes for facet labels

- bucket selection needs fixing

* [ADF-4083] fix bucket selection

- generate missing filterQuery values

* [ADF-4083] fix label display

* [ADF-4083] renaming

* [ADF-4083] support also single quotes label wrappings

- update documentation
- tests

* [ADF-4083] automatically escape facet field labels having spaces - better fix

* [ADF-4083] remove unneeded mentions from documentation

* [ADF-4083] clean-up code

* [ADF-4083] better naming param

* [ADF-4083] small refactoring
This commit is contained in:
Suzana Dirla
2019-02-21 14:49:47 +02:00
committed by Eugenio Romano
parent 877c57b356
commit bfec78aec9
5 changed files with 76 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ A typical configuration is shown below:
"expanded": true,
"fields": [
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
{ "field": "content.size", "mincount": 1, "label": "Size" },
{ "field": "content.size", "mincount": 1, "label": "File Size" },
{ "field": "creator", "mincount": 1, "label": "Creator" },
{ "field": "modifier", "mincount": 1, "label": "Modifier" }
]
@@ -254,13 +254,16 @@ export interface SearchWidgetSettings {
```json
{
"search": {
"facetFields": [
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
{ "field": "content.size", "mincount": 1, "label": "Size" },
{ "field": "creator", "mincount": 1, "label": "Creator" },
{ "field": "modifier", "mincount": 1, "label": "Modifier" },
{ "field": "created", "mincount": 1, "label": "Created" }
]
"facetFields": {
"expanded": true,
"fields": [
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
{ "field": "content.size", "mincount": 1, "label": "File Size" },
{ "field": "creator", "mincount": 1, "label": "Creator" },
{ "field": "modifier", "mincount": 1, "label": "Modifier" },
{ "field": "created", "mincount": 1, "label": "Created" }
]
}
}
}
```
@@ -268,7 +271,7 @@ export interface SearchWidgetSettings {
Every field declared within the `facetFields` group is presented by a separate collapsible category at runtime.
By default, users see only the top 5 entries.
If there are more than 5 entries, the "Show more" button is displayed to let the user move to
If there are more than 5 entries, a button to show more items is displayed to let the user move to
the next block of results.
![Facet Fields](../docassets/images/search-facet-fields.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 38 KiB