You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,49 @@ services:
70
70
71
71
You can delete the "dev" core from `http://<projectname>.ddev.site:8983/solr/#/~cores/dev` by clicking "Unload".
72
72
73
+
## Multiple Solr Cores
74
+
75
+
If you would like to use more than one Solr core, add a `.ddev/docker-compose.solr_extra.yaml` to override some of the default configuration.
76
+
77
+
1. Define a mount point for each core you require. Add new mount points for each core, for example:
78
+
```yml
79
+
services:
80
+
solr:
81
+
volumes:
82
+
- ./solr:/solr-conf
83
+
- ./core2:/core2-conf
84
+
- ./core3:/core3-conf
85
+
```
86
+
87
+
2. Create the directories for your new cores' config, and copy the desired solr config in to it, eg:
88
+
89
+
`cp -R .ddev/solr .ddev/core2`
90
+
91
+
`cp -R .ddev/solr .ddev/core3`
92
+
93
+
`cp -R path/to/core2-config/* .ddev/core2/conf/`
94
+
95
+
`cp -R path/to/core3-config/* .ddev/core3/conf/`
96
+
97
+
4. Set the 'entrypoint' value to use `precreate-core` instead of `solr-precreate` and add the additional cores, along with a command to start solr afterwards:
5. Finally, `ddev restart` to pick up the changes and create the new cores.
115
+
73
116
## Caveats
74
117
75
118
* This recipe won't work with versions of Solr before `solr:8`, and Acquia's hosting [requires Solr 7](https://docs.acquia.com/acquia-search/). You'll want to see the [contributed recipes](https://github.com/ddev/ddev-contrib) for older versions of Solr.
0 commit comments