{{ !articles[0].partner.isSponsoringArticle ? "Platinum" : "Portal" }} Partner

Behold! A Solr Client for Scala

Scala users, check this out!  If you've been trying to have a better interface for using Apache Solr in your Scala projects, there's a pretty new simple Solr client for Scala being developed on GitHub by Naoki Takezoe.  It hasn't been released yet but if this project is of interest to you, it might be worth it to lend a hand.

The client is based on SolrJ and you simply add a dependency into your build.sbt.  Here is the simplest example of its usage:
import jp.sf.amateras.solr.scala._

val client = new SolrClient("http://localhost:8983/solr")

// register
  .add(Map("id"->"001", "manu" -> "Lenovo", "name" -> "ThinkPad X201s"))
  .add(Map("id"->"002", "manu" -> "Lenovo", "name" -> "ThinkPad X220"))
  .add(Map("id"->"003", "manu" -> "Lenovo", "name" -> "ThinkPad X121e"))

// query
val result: List[Map[String, Any]] =
    .fields("id", "manu", "name")
    .sortBy("id", Order.asc)
    .getResult(Map("name" -> "ThinkPad"))

result.foreach { doc: Map[String, Any] =>
  println("id: " + doc("id"))
  println("  manu: " + doc("manu"))
  println("  name: " + doc("name"))
Here is the list of features that Takezoe wants to add before release:

  •     Mapping document to case class
  •     Flexible configuration to SolrServer
  •     Facet search

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks