Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.
seratch edited this page Feb 15, 2012 · 2 revisions

Request

com/github/seratch/scalikesolr/request/DIHCommandRequest.scala

case class DIHCommandRequest(
  val core: SolrCore,
  val writerType: WriterType,
  val command) {

  def updateExtraParam(key: String, value: Any)
  def removeExtraParam(key: String)
}

object DIHCommandRequest {
  val FullImport = new DIHCommandRequest("full-import")
  val DeltaImport = new DIHCommandRequest("delta-import")
}

Response

com/github/seratch/scalikesolr/response/DIHCommandResponse.scala

case class DIHCommandResponse(
  val writerType: WriterType,
  val rawBody: String) {

  lazy val responseHeader: ResponseHeader
  lazy val initArgs: InitArgs
  lazy val command: String
  lazy val status: String 
  lazy val importResponse: String
  lazy val statusMessages: StatusMessages
}

Usage

val client = Solr.httpServer(new URL("http://localhost:8983/solr")).newClient

val request = new DIHCommandRequest(command = "delta-import")
val response = client.doDIHCommand(request)

val request = DIHCommandRequest.FullImport 
val response = client.doDIHCommand(request)
Clone this wiki locally