Provide for exporting and saving to files faceted search environments
jbrauer - May 16, 2008 - 07:49
| Project: | Faceted Search |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
It would be great to be able to export/import and ideally save faceted search environments to files to ease moving environments amongst servers (dev, qa, prod etc).

#1
i would like to have this feature too.
Perhaps it would be possible using
From Ctools Module
#2
sry this is a duplicate of #304660: Support for exported views in faceted_search_views
#3
sad its not
#4
Hey,
We needed this functionality to work on a site over here, here's a preliminary patch that supports it. It is fairly extensive, requiring the module to use names rather than ids to reference environments. Test it out, and if changes are needed please advise. Look at faceted_search.module for how to define an environment in a code hook--use hook_faceted_search_env_define() and basically take what you get from the export box. This is very similar/modeled after the views workflow. Outstanding stuff:
1) There is no caching of code-defined environments a la views--this could be added.
2) There were some API changes. One goes from faceted_search_get_env_ids() to faceted_search_get_env_names($disabled = FALSE). The new one returns names rather than ids, and also accepts an argument to load disabled environments (only used on admin page). This will break some modules, like context_facets, but they will just require the function to be renamed. It could go without a rename, but if it is implemented in a more complicated manner (other than always listing and loading with api funcs) it could get messed up. faceted_search_env_load now also takes a name rather than an id.
3) More testing is needed, especially with any implementing modules that go beyond defining a filter, a process who's API was luckily unaffected by this change.
Thanks,
David
#5
Subscribing