This repository was archived by the owner on Aug 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
DIH
seratch edited this page Feb 15, 2012
·
2 revisions
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")
}
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
}
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)