Solr With Scala: Rest End Points with AKKA HTTP


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.

This entry was posted in akka-http, Scala and tagged , , , , , , . Bookmark the permalink.

2 Responses to Solr With Scala: Rest End Points with AKKA HTTP

  1. Pingback: Solr With Scala : Basic Introduction to Embedded Solr | Knoldus

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s