Deploying Solr tips and tricks

Hi all :wave:t4:

For quite a few years we are using Solr to power our searches, and plenty more (like highly customized related documents based with advanced criterias).

Since the beginning we had only one collection, but we are thinking about expanding it to use Solr Cloud (for replication and high availability) as well as sharing the content, to increase response times.

We hit a problem these last few days where Solr was being killed by Solr's own OOM due to the heap size being too small (the default 512 Mb).

We are using a slightly modified version of kitconcept.recipe.solr, but that's not helping (together with supervisor) to change the heap size, and I haven't checked how one can keep using both (k.r.solr and supervisor) with sharding and Solr Cloud, so...

Who is using Solr and is using these advanced configurations? Any tips? how do you deploy it? How do you manage the collections and sharding? Specially also reindexes when moving to newer versions?

Oh, :rotating_light: and do not forget to bump luceneMatchVersion. That has been a terrific suprise :man_facepalming:t4: if I got it correctly, does not matter that we bumped from Solr 4.x to currently 8.x, as lont as luceneMatchVersion is still on 4.5 we are NOT using the new algorithms and optimizations from Solr 5.x, 6.x, 7.x nor 8.x :scream:

And finally, thought might be the first and most important, does anyone have managed to integrate Solr file logging with something like Sentry? That's what we use to aggregate errors.

I'm looking forward to learn a lot :nerd_face: :four_leaf_clover:

1 Like

These days kitconcept is deploying solr in a Docker container. (With the official image: Docker)

I don't think we have tried using sharding and Solr Cloud yet. We should probably take a look...

Nice tip about luceneMatchVersion!

For forwarding logs to Sentry, I would look at using the OpenTelemetry Collector (Collector | OpenTelemetry) to retrieve logs from solr, process/filter them as necessary, and export to Sentry. But I haven't tried using it with Sentry specifically.

1 Like