Figure out Solr on api.drupal.org and then deploy
Migrated issue
Reported by: jhodgdon
Now that the API module has working Solr integration (at least in the -dev branch, see #84207: Integrate API full text search into the ApacheSolr setup), we should deploy Solr on api.drupal.org.
I'm using these two sites for testing:
- https://solr-api.redesign.devdrupal.org (api.d.o clone)
- https://docs_manage-drupal.redesign.devdrupal.org (d.o clone)
With the current indexing, "profile" is a good search term. On the api.d.o clone, after searching for "profile" you can narrow down to files or functions.
On the d.o clone, after searching for "profile", you can narrow down to "Documentation", and then choose content type "API documentation".
How to set up Solr
Here are the steps to get this set up:
- Enable modules:
drush en apachesolr apachesolr_search search api_search facetapi apachesolr_multisitesearch - On admin/config/search/apachesolr :
- Enable "API reference entries" nodes to be indexed. - On admin/config/search/apachesolr/settings/solr/facets
- Enable the Project, Core Compatibility, and Object Type facets. - On admin/config/development/api/search
- Set the core compatibilities to
6.x,7.x,8.x
DO NOT DO THIS MULTIPLE TIMES -- it takes a while, since it goes through all incompatible documentation objects and attempts to delete them from the search index, in case you didn't have this set the same previously (or at all). - On admin/config/search/settings :
- Make Apache Solr search the only search module
- Make Apache Solr search the default search module - Either run cron for a while, or click the "Index queued content (50)" button a few times to get some content into the index.
- On the Blocks page, turn on the block for the search box and for the Facets. Arrange them in the right sidebar (Facets will only turn on after a search is in progress). Give the Search box a title like "Full-text search" to distinguish it from the API search box.
- On admin/people/permissions
- Grant "Use search" permission to anon/auth users
How to use Solr
On the API site:
- After a few cron runs or index runs, you should be able to search for "function" and get results.
- You can search using the Search block, or go to /search.
On the d.o site:
- You can search for something that you've verified is visible in the API site search, and then limit the results to "Documentation" to get results, and then further limit by content type to choose between docs pages and API pages.
- This also makes the content type facet available for Issues and Forums searches.
Remaining Tasks and Questions
Test and deploy.
Pre-migration files