I've disabled Database Node Index and Database Search and enabled Solr Server and Solr Node Index but I can't figure out where to edit the navbar search field to use the Solr index instead of the Database one. Searching just gives the error, "Cannot search on a disabled index."

Thanks!

Comments

mpotter’s picture

OA2 just uses the Panopoly Search module, so you might post your question there. It just uses Search API so if you just fill in your SOLR server info it should just work and use your enabled index. After enabling the index did you tell it to re-index your content? You might also check your search settings in the Drupal configuration to be sure it's pointed at the solr search and not the db node search.

cgove’s picture

Thanks, I'll post over there too. Search settings doesn't show the solr search as an option, it only lists File entity, Node, and User as possible search modules. The solr server is working an all the content is indexed for sure, just the search field in the toolbar doesn't point to it.

I noticed Search API is a bit out of date with this distribution, would I break things if I were to upgrade it? I know a lot of the modules were customized for Open Atrium, but don't know which ones.

I wanted to try disabling search module to rely on Search API exclusively, but the Atrium Search module requires it.

mpotter’s picture

Maybe you should try the -dev version. It uses the latest 1.7 version of search_api and has the updated Panopoly Search that Open Atrium 2 is using in the search bar.

cgove’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev

Yea, it behaves almost exactly the same in the dev version.

Same three options (File entity, Node, and User) in search settings. When searching with Database disabled search returns a white screen with "Fatal error: Call to a member function range() on a non-object in /var/www/devmy/profiles/openatrium/modules/contrib/search_api/contrib/search_api_views/includes/query.inc on line 246"

mpotter’s picture

I've had some mixed errors when upgrading previous Open Atrium 2 (alpha) sites to the latest version. Here are the steps I have used to resolve most of these problems:

0) Install the Beta4 version of OA2.

1) drush dis -y search_api
(it will list a bunch of dependent modules that will also be disabled:
search_api, search_api_db, search_api_facetapi, search_api_solr, search_api_views, panopoly_search, oa_search)

2) starting from oa_search and working backwards, uninstall each module via:
drush pm-uninstall modulename
(so uninstall each module, starting with oa_search and ending with search_api)

3) next, enable each module, starting with search_api and ending with oa_search
drush en -y modulename

This will recreate some missing search_api tables that didn't get properly created in previous versions. As far as I can tell, clean new installs don't have this problem, although I still see some search_api warnings.

cgove’s picture

Thank you for your dedication to this problem. I followed all of those steps and the behavior remains. The only difference I see is now there is an additional disabled "Default node index"

cgove’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta4

I just installed OA b4 fresh and strangely it gave the warning message that the Database and Solr panel views had been deleted on install. After adding some test content and using the search functionality, it returned a 404 not found error. I see an entry in structure/pages for search-node and it seems to be configured as a search page. I suppose I'm just trying to figure out where exactly the panel is configured to use one search index or the other.

cgove’s picture

Ok, I'm starting to understand where panels connects to search_api. I have to add a "Solr Search Results" content pane to the search-node in structure/pages and remove the "Database Search Results." I assume the facets also have to be switched.

I still don't know what is going on with that 404 on the fresh b4 install, but at least I have Solr working now on my upgraded install.

cgove’s picture

How would I add the OpenAtrium Section > Title and Space ID > Title facets to the solr index? Would this have to be coded or is there a GUI method to add these?

cgove’s picture

Some more progress here. I got the Solr results themed the same way as database results by copying the views-view-fields--search-database-results.tpl.php from the oa_search module to my theme template folder and renaming it to views-view-fields--search-solr-results.tpl.php . I had to remove the $field_featured_image line though because it spat out errors.

cgove’s picture

I got the facets working by adding the Space ID and AtriumSection ID fields. After enabling the title fields for each, the facets became available to activate. That solves my remaining issues!

I'll keep this active in case you still want to pursue the 404 error appearing on the fresh beta4 install.

helmo’s picture

I also see the #2080979: WD search_api_solr: SearchApiException while deleting an index's data: "0" Status: Request failed: Connection refused error while installing on Aegir.

The solr server seems to be defined in panopoly_search/panopoly_search.features.inc and is not enabled by default. Not sure though what code triggers a connection to a disabled server. Could be some well intended test for the availability of a server on localhost...

helmo’s picture

If anyone finds the code that triggers this, adding a try {} catch (e) {} around it might help.

mpotter’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Search issues should have been resolved in recent updates.