Mirror Server Search Broken

I just finished following the docker guide for setting up a mirror server, and everything is working except for search. When using indexed search through the API or web interface, it returns no results. Switching to direct search returns some results, but far fewer than the main website gives. (Mirror search for Artist Fred returns 38 results vs. 7,665 by the main server).

select COUNT(*) from artist where name ILIKE ‘%fred%’;
Running this SQL command returns 6,842 for further info.

Is this indicative of an issue with my search index or my database as a whole? How would I go about rebuilding either? Any help is appreciated.

Mirror search for Artist Fred returns 38 results vs. 7,665 by the main server

You’re comparing direct search vs. indexed search, though. Direct search on the main server also returns 38 results:

https://musicbrainz.org/search?query=Fred&type=artist&limit=25&method=direct

Running this SQL command returns 6,842 for further info.

Basically the same result on the production DB (6845, so a few more Freds showed up).

Sounds like your database is fine and you’re just missing search indexes.

Normally you should be able to rebuild search indexes as described here:

If you’ve already attempted this, try checking your indexer logs for errors: sudo docker-compose logs indexer.

5 Likes

Thank you, my mistake with indexed vs direct search. I redownloaded the search indexes and loaded them, and it seems to be working now.

2 Likes