Solr With Scala: Rest End Points with AKKA HTTP

Table of contents
Reading Time: < 1 minute

Hello Folks,

Today we will discuss about Solr, Scala with Akka-HTTP. We will create rest-endpoints and try to connect with Solr server with them.

The basic idea behind using Akka-HTTP for creating Rest end points is modules implement a full server and client-side HTTP stack on top of akka-actor and akka-stream. We can customize these routes according to our use case.

We will talk step by step to develop this Rest API after which you will able to run this API on your server and start hitting Rest end points.

Now we start coding :

  1. pom.xml:
    We will start our implementation with the pom.xml file. We will keep all require dependencies in this file.
  2. Factories:
    This is the part where we interact with the Solr. This code shows how we can can insert or update data and query for searching data from the Solr system.
  3. Routes:
    This is the part where we develop routes to provide rest end points to the client so that they can interact with server and perform the operation which are mention in Factories using REST end points.
  4. application.conf:
    This is the part where we define our configuration like http’s interface , port and Solr’s url, collectionName. We define this file in resources folder.

This is the basic idea for developing a Rest end points with Akka-http. If you want to see code, you can find here and if you want to use template you can find here or you all can just follow the README.md file and you will ready to hit the server.

This is the basic implementation of how to perform basic operation on Solr using the Akka-HTTP.

Written by 

Anurag is the Sr. Software Consultant @ Knoldus Software LLP. In his 3 years of experience, he has become the developer with proven experience in architecting and developing web applications.

2 thoughts on “Solr With Scala: Rest End Points with AKKA HTTP1 min read

Comments are closed.

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading