I was investigating issues with facets support #2827696: Facets support and I came to a conclusion that the ID used in the annonation (in src/Plugin/search_api/display/ViewsDataDisplay.php) is not correct.
There is an issue with the name of the facet source and the name that facets is expecting in facets_search_api_query_alter()
In "/admin/config/search/facets"

facets.module, facets_search_api_query_alter()

Facets is expecting the name to have "_export" in it.
I guess this come from the annotation that was introduced in #2827696: Facets support
+++ b/src/Plugin/search_api/display/ViewsDataDisplay.php
@@ -0,0 +1,16 @@
+ * @SearchApiDisplay(
+ * id = "views_data",
+ * views_display_type = "data_export",
+ * deriver = "Drupal\search_api\Plugin\search_api\display\ViewsDisplayDeriver"
+ * )
Using id = "views_data_export", as the ID solves the issue for me.
What do you think about ?
Comments
Comment #2
hazaComment #3
hazaPatch attached.
Comment #4
borisson_We (or rather, search_api), expect that the id matches the display type. So this patch does solve it.
Comment #6
jhedstromThanks! I've committed #3.