DAY 52

Today we are going to install Solr in our docker-compose. What should be better way to install Solr? Whether it should be installed inside tomcat container, or wordpress container, since wordpress has apache, or should it be installed in a separate container. To answer these questions I referred to  a conference “Lucene/Solr revolution 2016” which was held last December. I came to know about it by this blog post.

Earlier I was of the impression that Solr is a service which runs within a server and provides help in indexing and searching within the site on the server. But when I saw it functional in a video, I realized that it a lot more than that.

Fortunately I came across another post where the blogger has deployed a Solr container. The post Running Solr in Docker, talks about reasons of using Solr in docker and then goes on to explain the process in detail. The details regarding getting conf files and also deploying data, are done by using web interface. And I want it to be done by the docker-compose itself, so that end user does not have to do anything and gets a ready to use docker.

While looking for  the configuration files  I found them inside the Solr_data. To  know about any  setting during installation, I browsed which was in github of reactomerelease/scripts. And then came back to  docker/solr_alpine. I noticed that most images we are using, are based on openjdk:8-jre-alpine. Neo4j was also based on this and now Solr is also based on the same.

Content of solr_data.gz were extracted in solr/data. ls solr/data results in reactome    solr.xml. They were mounted at proper place in container using

  - ./solr/data:/opt/solr/server/solr/mycores

The process was initiated and after a while there were following errors:

Error loading class 'solr.admin.AdminHandlers'

Probably my version of Solr is different. And as said in this answer, I removed the following line from solrconfig.xml

<requestHandler name="/admin/"

Now it works fine. But I don’t know if I have done it correctly and if it is the way we wanted it to be. As of now, we have Solr ready and it is accessible in browser at localhost:8983. Earlier some other other cores were also getting created like, mycore.

Wanna say something?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s