- πΊπΈUnited States jiong_ye
Ran into this issue https://www.drupal.org/project/facets/issues/3368327 π Facets Pretty Paths module and Merge node types processor error Active
Updated the patch slightly. - πΊπΈUnited States mgaskey
Re-rolled the patch in #14 to improve the language used in comments and the UI. The functionality works great in the original patch.
- last update
about 1 year ago Composer require failure - πΊπΈUnited States thomps9012
For context we're using version 2.0.6 of facets, solr / solr cloud, and json:api search index.
Here's what we're seeing for the url of our merged node facet (in the metadata section of our json:api response):
https://base_url.com/jsonapi/index/solr_node_index?filter[facet_group]=facet_item&filter[0]=facet_group:facet_item&filter[1]=facet_group:facet_item
Which is not a clickable link.
Our patch corrects the generated url to the below:
https://base_url.com/jsonapi/index/solr_node_index?filter[facet_merged_name][condition][path]=facet_group&filter[facet_merged_name][condition][value][0]=facet_item_1&filter[facet_merged_name][condition][value][1]=facet_item_2&filter[facet_merged_name][condition][value][2]=facet_item_3
Which is a clickable link
Hopefully this patch helps resolve this issue for some others, if not
- πΊπΈUnited States thomps9012
FYI the interdiff is in the previous comment and file 3133309-18.patch attached to this comment is the actual patch
- πΊπΈUnited States thomps9012
Resolution to patch 19 which was attempting to pass the translate object as a query parameter
- π©πͺGermany mkalkbrenner π©πͺ
We already have a combine facets processor in 3.0.x. doesn't it solve the requirements here?
- πͺπΈSpain pcambra Asturies
@mkalkbrenner the use case here is a common requirement by clients to group content types (and other fields) together in the same value for filtering, for example to produce a checkbox widget like so:
[ ] Latest
[ ] Articles
[ ] DocumentsWhere Latest are from content types blog and news, Articles are from content type article and page, and Documents are from document and file content type (just a quick example).
This can be done either at index time with a computed field or something, or at search time, with the work on this patch, I don't think it's the same as combining facets.
- π΅πPhilippines _renify_ cebu
This works on my end.
Use the query params which compatible to $filter_key & $filter_name.Facets selected:
article -> Page
page -> Page
news -> NewsIt should look like this:
/search?f[0]=type:article&f[1]=type:page&f[3]=type:news - πΊπΈUnited States jeffschuler Boulder, Colorado
@_renify_: Mind summarizing your changes?
Here's the interdiff between patches #20 & #23.
We've been using the patch in #20 successfully for a year now. In patch #23, you cannot uncheck the merged items once you select them. #20 works as expected
- πΊπΈUnited States cscottjames
Similar to @dxvargas 's comment above: I need a similar solution, but for media bundles (not node types). Were this feature merged into the Facets module, it would be nice to incorporate other bundle types into this.