Problem/Motivation

A new extension with the most reliable modules for indexing and searching through Drupal and external entities like Solr or other kind of services may be a good addition to this profile.

I'd like to suggest a list of modules suited for this purpose, open to any validation, criticism or new additions to it.

Complete list, directly from some projects I worked in:

Database search (search_api_db)
Sarnia (sarnia)
Search API (search_api)
Search API autocomplete (search_api_autocomplete)
Search facets (search_api_facetapi)
Search pages (search_api_page)
Search views (search_api_views)
Solr search (search_api_solr)
Facet API (facetapi)
Facet API Bonus (facetapi_bonus)
Services (services)
Web service client (wsclient)
Web service client examples (wsclient_examples)
Web service client REST (wsclient_rest)
Web service client SOAP (wsclient_soap)
Web service client Tester (wsclient_tester)
Web service client UI (wsclient_ui)

Or, in short:

Search API (search_api) and submodules
Sarnia (sarnia) and submodules
Facet API (facetapi) and submodules
Services (services)
Web service client (wsclient) and submodules

PS: I've been told to ignore wsclient, as it is a single module that may be installed later if needed, less dependent on the others. Also, some people reported problems with Sarnia module that were not easy enough to patch and/or avoid, and said that it should not be included on this list.

Comments

joe_carvajal’s picture

I think it's a good idea for improve Drupal Origins profile, but I would not include WS modules in this extension. Almost all Drupal projects has a search engine, but not many of them use web services too.

Also, Solr needs an Apachesolr server running to work properly, so I would not include it too.

I think this is the best for this new extension:

  • Search API
  • Search API Views
  • Database Search
  • Search facets
  • Facet API

I'll try to perform a default configuration to create a search database server and an index. The developers who use D. Origins would have to add new field to this search index.

  • joe_carvajal committed c63831e on 7.x-1.x
    Issue #2438077 - Add new Drupal Origins Search extensions, update README...
joe_carvajal’s picture

Assigned: Unassigned » joe_carvajal
Status: Active » Needs work

Added new Search extension with modules in comment #1, but no additional settings yet. I'll work on it.

joe_carvajal’s picture

Assigned: joe_carvajal » Unassigned
Status: Needs work » Closed (fixed)

Finally I decided not to create default settings for Search API module. I tried to replicate Search API server creation process from search_api_admin_add_server_submit function. I used this code:

function drupal_origins_search_install() {
// Get the proper localization function.
  $t = get_t();

  $empty_array = array();

  $values = array(
    'name' => $t('Search API Database Server'),
    'machine_name' => 'search_api_database_server',
    'enabled' => TRUE,
    'description' => $t('Search API Database Server allows creation of indexes to perform searches on database indexes.'),
    'class' => 'search_api_db_service',
  );

  $options = array(
    'database' => 'default:default',
    'min_chars' => '1',
    'partial_matches' => FALSE,
  );

  $server = entity_create('search_api_server', $values);
  $server->configurationFormSubmit($empty_array, $options, $empty_array);
  $server->save();
}

There are no errors when I activate Search extension, but I don't know if these $empty_array should be filled with additional form or form_state data, so I don't know if the server is created properly or not. I prefer not to upload code I'm not sure of, so Search API server should be created by developers using D. Origins Search Extension.

Mark the issue as fixed (added Search Extension, but without config).