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: HACKING.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ Solr logs are useful to debug making a search query with MBS and/or indexing doc
54
54
55
55
In a terminal, follow Solr logs using:
56
56
57
-
```sh
58
-
docker-compose logs -f --tail 1 search
57
+
```bash
58
+
dockercompose logs -f --tail 1 search
59
59
```
60
60
61
61
For an example, browse your local MusicBrainz Server instance at
@@ -73,7 +73,7 @@ Solr Admin
73
73
To debug how other components (MBS, SIR) interact with the search server,
74
74
the Solr Admin web interface (browsable from <http://localhost:8983>) is your friend.
75
75
76
-
See “[Getting Started / Solr Admin UI](https://solr.apache.org/guide/solr/latest/getting-started/solr-admin-ui.html)"
76
+
See “[Getting Started / Solr Admin UI](https://solr.apache.org/guide/solr/9_7/getting-started/solr-admin-ui.html)"
77
77
in the Apache Solr Reference Guide 9.7 for more information.
78
78
79
79
### Query screen
@@ -124,11 +124,11 @@ Some parameters are automatically set on all queries based on the core configura
124
124
125
125
Some parameters are set based on the request handler.
126
126
These are identified as "invariants", which means that the parameters will always be set to this value even if you specify a different value in the admin interface.
127
-
For example the [`basic` request handler](https://github.com/metabrainz/mbsssss/blob/v-2021-05-14/common/requestHandler-basic.xml) erases the `pf` field for good.
127
+
For example the [`basic` request handler](https://github.com/metabrainz/mbsssss/blob/v-2025-05-13/common/requestHandler-basic.xml) erases the `pf` field for good.
128
128
129
129
Some parameters for ranking are set with defaults and can be overridden.
130
130
These can be changed by copying them into the relevant fields in the admin query panel to see the resulting change in ranking order.
131
-
For example the [release’s request parameters](https://github.com/metabrainz/mbsssss/blob/v-2021-05-14/release/conf/request-params.xml)
131
+
For example the [release’s request parameters](https://github.com/metabrainz/mbsssss/blob/v-2025-05-13/release/conf/request-params.xml)
132
132
has a default value for the `fl` field which can be overriden if needed
133
133
(while the `pf` value will still be erased if used from the `/basic` endpoint).
for Solr cores running on an [mbsssss](https://github.com/mineo/mbsssss) schema.
7
+
for Solr cores running on an [mbsssss](https://github.com/metabrainz/mbsssss) schema.
8
8
9
-
## Licensing
9
+
## Prerequisites
10
10
11
-
Note - Part of the code at org.musicbrainz.search.analysis is adapted almost entirely from Lucene core libs.
12
-
As such those files are licensed under Apache 2.0 license which is compatible with the existing BSD license of MB-Solr.
11
+
In May 2025, Solr data for indexing the whole MusicBrainz database takes ~75 GB of disk space.
12
+
Since indexing takes hours, you might want to load the Zstandard-compressed backup archives.
13
+
Those archives take ~60 GB of disk space and their temporarily extracted files take ~75 GB more.
14
+
Hence, it is currently recommended to provision at least 250 GB of disk space for Solr.
15
+
16
+
Recommendations:
17
+
* RAM: 4 GB
18
+
* CPU: 8 threads, x86-64 architecture
19
+
* Disk Space: 250 GB (or 100 GB if you don't load backups.)
20
+
21
+
Required software:
22
+
* Git
23
+
* Docker 2
24
+
(or Java SE 17, Maven 3, and Solr 9.7.0)
13
25
14
26
## Installation
15
27
16
-
### Installing brainz-mmd2-jaxb
28
+
The generally recommended installation method is using [Docker](https://docs.docker.com).
29
+
A Docker image is available through the eponymous [Docker Hub repository](https://hub.docker.com/r/metabrainz/mb-solr) for each release of MusicBrainz Solr.
30
+
These images can be used through the [MusicBrainz Docker Compose project](https://github.com/metabrainz/musicbrainz-docker) which comes with instructions.
31
+
32
+
For [development](#development) or other purposes, these images can also be run alone, see the below subsection “[Installation without MusicBrainz Server](#installation-without-musicbrainz-server)”.
33
+
34
+
To set up a cluster of Solr nodes, it can be preferred to install to the host system directly, see the below subsection “[Installation without Docker](#installation-without-docker)” and the [Apache Solr Reference Guide 9.7](https://solr.apache.org/guide/solr/9_7/).
5. Use this tag to [set `MB_SOLR_VERSION` in MusicBrainz Docker Compose project](https://github.com/metabrainz/musicbrainz-docker?tab=readme-ov-file#local-development-of-musicbrainz-solr).
114
172
115
-
docker-compose up
173
+
See also [The Debugger’s Guide to MusicBrainz Solr](HACKING.md).
116
174
117
-
Or build a tagged image to run with [MusicBrainz Docker](https://github.com/metabrainz/musicbrainz-docker):
175
+
## Helper commands
176
+
177
+
SolrCloud collections backups from the MusicBrainz Solr cluster
178
+
powering musicbrainz.org are made available twice a week to save
179
+
mirror owners the initial cost of indexing the whole MusicBrainz data
180
+
from scratch which can take hours and significant resources.
181
+
Those backups are provided as Zstandard-compressed tar archives.
182
+
Helper commands to handle these archives are provided in Docker images:
183
+
184
+
```bash
185
+
fetch-backup-archives
186
+
load-backup-archives
187
+
remove-backup-archives
188
+
```
189
+
190
+
In May 2025, the measured time for fetching 60 GB was 12 min (depending on your bandwidth,)
191
+
and the measured time for loading was 12 min (depending on your CPU/RAM/Disk speed.)
192
+
193
+
A fourth helper command allows to delete all the Solr data if needed:
194
+
195
+
```bash
196
+
delete-indexed-documents
197
+
```
118
198
119
-
./build.sh
199
+
Each of these commands is self-documented through the option `--help`.
0 commit comments