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

dereine - June 18, 2009 - 20:52

i would like to have this feature too.

Perhaps it would be possible using

Exportables -- tools to make it easier for modules to have objects that live in database or live in code, such as 'default views'.

From Ctools Module

#2

dereine - June 18, 2009 - 22:26
Status:active» duplicate

sry this is a duplicate of #304660: Support for exported views in faceted_search_views

#3

dereine - June 18, 2009 - 22:29
Status:duplicate» active

sad its not

#4

David Goode - June 19, 2009 - 16:35
Status:active» needs review

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

AttachmentSize
faceted_search_export_names.patch 24.51 KB

#5

q0rban - October 9, 2009 - 20:04

Subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.