Execute batch updating.
Execute batch updating.
Note: To register documents actual, you have to call commit after added them.
import jp.sf.amateras.solr.scala._ val client = new SolrClient("http://localhost:8983/solr") client.add(Map("id"->"001", "manu" -> "Lenovo", "name" -> "ThinkPad X201s")) .add(Map("id"->"002", "manu" -> "Lenovo", "name" -> "ThinkPad X202")) .add(Map("id"->"003", "manu" -> "Lenovo", "name" -> "ThinkPad X100e")) .commit
Commit the current session.
Delete the document which has a given id.
Delete the document which has a given id.
the identifier of the document to delete
Delete documents by the given query.
Delete documents by the given query.
the solr query to select documents which would be deleted
the parameter map which would be given to the query
Search documents using the given query.
Search documents using the given query.
import jp.sf.amateras.solr.scala._ val client = new SolrClient("http://localhost:8983/solr") val result: List[Map[String, Any]] = client.query("*:*") .fields("id", "manu", "name") .sortBy("id", Order.asc) .getResultAsMap()
Add documents and commit them immediately.
Add documents and commit them immediately.
documents to register
Rolled back the current session.
Shutdown this solr client to release allocated resources.
Execute given operation in the transaction.
Execute given operation in the transaction.
The transaction is committed if operation was successful. But the transaction is rolled back if an error occurred.
This is the simple Apache Solr client for Scala.