Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

The following sequence of commands:

1. Adds the Elasticsearch container.
2. Sets Elasticsearch as the search engine.
3. Restarts the DDEV cluster and clears application cache.
4. Injects the schema and reindexes the content.
1. Adds the Elasticsearch container
2. Sets Elasticsearch as the search engine
3. Restarts the DDEV cluster and clears application cache
4. Injects the schema and reindexes the content

```bash
ddev add-on get ddev/ddev-elasticsearch
Expand Down Expand Up @@ -68,22 +68,44 @@

### Solr

To simplify the installation of Solr, you can use the `ibexa/ddev-solr` add-on:
The following sequence of commands:

1. Adds the Solr container
2. Sets Solr as the search engine
3. Start the DDEV cluster to creates core config by combining default files and those provided by [[= product_name =]]
4. Restarts the DDEV cluster and clears application cache
5. Reindexes the content

```bash
ddev add-on get ibexa/ddev-solr
ddev add-on get ddev/ddev-solr
ddev config --web-environment-add SEARCH_ENGINE=solr
ddev config --web-environment-add SOLR_DSN=http://solr:8983/solr
ddev config --web-environment-add SOLR_CORE=collection1
ddev start
mkdir .ddev/solr/configsets/collection1
ddev exec -s solr cp -R /opt/solr/server/solr/configsets/_default/conf/* /mnt/ddev_config/solr/configsets/collection1/
cp -R vendor/ibexa/solr/src/lib/Resources/config/solr/* .ddev/solr/configsets/collection1/
ddev restart
ddev php bin/console cache:clear
ddev php bin/console ibexa:reindex
```

You can now check whether Solr works.

For example, the `ddev exec curl -s http://solr:8983/api/cores/` command:
For example, the `ddev exec curl -s http://solr:SolrRocks@solr:8983/api/cores/` command:

- checks whether the `web` server can access the `solr` server
- checks whether `collection1` exists and its status
- displays `collection1`'s `numDocs` that shouldn't be zero if indexing worked correctly

You can access the Solr admin UI from the host by using port 8983 on the same `.ddev.site` subdomain as the front. Use `ddev describe` to get that URL.
You can access the Solr admin UI from the host by:

- running `ddev solr-admin` command
- accessing port 8983 on the same `.ddev.site` subdomain than the web server (or use `ddev describe` to get this URL).

Check failure on line 104 in docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md#L104

[Ibexa.Lists] Do not put fullstops at the end of bullets
Raw output
{"message": "[Ibexa.Lists] Do not put fullstops at the end of bullets", "location": {"path": "docs/infrastructure_and_maintenance/clustering/clustering_with_ddev.md", "range": {"start": {"line": 104, "column": 41}}}, "severity": "ERROR"}

Use the credentials username `solr` and password `SolrRocks`.

For more information on topics such as available versions of Solr, see [ddev/ddev-solr README](https://github.com/ddev/ddev-solr).

## Share cache and sessions

Expand Down
Loading