こんにちは、馬場です。 前回に続き、全文検索エンジンのSolr と elasticsearchの比較を行いたいと思います。今回はドキュメントの登録です。 クライアントプログラムはScalaで実装します。どちらもJavaのAPI を提供しているので、それを利用しようと思います。 ※ この記事では、Solr 4.6.0 とelasticsearch 0.90 の比較を行います。 Solr の場合 SolrでJava クライアント APIを利用する場合、sbt に以下のjarを登録します。 "org.apache.solr" % "solr-solrj" % "4.6.0" 次にドキュメントを登録するサンプルコードです。 import org.apache.solr.client.solrj.impl.HttpSolrServer import org.apache.solr.common.S