Skip to content

Commit 1b53504

Browse files
committed
Better readme
1 parent 59edb25 commit 1b53504

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[![tests](https://github.com/rfay/solr/actions/workflows/tests.yml/badge.svg)](https://github.com/rfay/solr/actions/workflows/tests.yml)
2+
3+
## Installation on Drupal 9
4+
5+
* `ddev service get rfay/solr && ddev restart`
6+
* You may need to install the relevant Drupal requirements: `ddev composer require drush/drush:* drupal/search_api_solr`
7+
* Enable the Search API Solr Search Defaults module: `ddev drush en -y search_api_solr_defaults`. (If it can't be enabled due to the "article" content type not existing, you can just create a search_api_solr server manually.)
8+
* Edit the enabled search_api server named `default_solr_server` at `admin/config/search/search-api/server/default_solr_server/edit`
9+
* set "Solr host" to `solr`
10+
* set "Solr core" name to "dev"
11+
* Under "Advanced server configuration" set the "solr.install.dir" to `/opt/solr`
12+
* `ddev restart`
13+
14+
## Explanation
15+
16+
This is the classic Drupal solr 8 recipe used for a long time by Drupal users and compatible with search_api_solr.
17+
18+
It installs a `docker-compose.solr.yaml` and a standard downloaded configuration.
19+
20+
## Interacting with Apache Solr
21+
22+
* The Solr admin interface will be accessible at: `http://<projectname>.ddev.site:8983/solr/` For example, if the project is named "_myproject_" the hostname will be: `http://myproject.ddev.site:8983/solr/`.
23+
* To access the Solr container from the web container use: `http://solr:8983/solr/`
24+
* A Solr core is automatically created by default with the name "dev"; it can be accessed (from inside the web container) at the URL: `http://solr:8983/solr/dev` or from the host at `http://<projectname>.ddev.site:8983/solr/#/~cores/dev`. You can obviously create other cores to meet your needs.
25+
26+
## Caveats
27+
* This recipe won't work with versions of solr before solr:8, and Acquia and Pantheon.io hosting seem to require versions from 3 to 7. You'll want to see the [contributed recipes](https://github.com/drud/ddev-contrib) for older versions of solr.

0 commit comments

Comments
 (0)