Skip to content
Permalink
Browse files

adjust solr for deletion

  • Loading branch information...
ivangiangreco committed Nov 22, 2018
1 parent 3333ddc commit 6f2553f40c1c20f7936dd8bc09b698535d44bdcf
Showing with 7 additions and 5 deletions.
  1. +1 −1 build.sbt
  2. +6 −4 src/main/scala/org/vitrivr/adampro/storage/engine/SolrEngine.scala
@@ -96,7 +96,7 @@ val secondaryLibs = Seq(

//tertiary libs
val tertiaryLibs = Seq(
"com.lucidworks.spark" % "spark-solr" % "3.3.0",
"com.lucidworks.spark" % "spark-solr" % "3.6.0",
"org.postgresql" % "postgresql" % "9.4.1208",
"com.datastax.spark" %% "spark-cassandra-connector" % "2.3.2",
"net.postgis" % "postgis-jdbc" % "2.2.1",
@@ -306,13 +306,15 @@ class SolrEngine(private val url: String)(@transient override implicit val ac: S
* @return
*/
override def drop(storename: String)(implicit ac: SharedComponentContext): Try[Void] = {
val client = getClient(url, Some(storename))
val client = getClient(url)

try {
client.deleteByQuery("*:*")
client.deleteByQuery(storename, "*:*")
client.commit(storename)
} catch {
case e: Exception => log.error("error while deleting content from solr: " + e.getMessage)
case e: Exception => {
log.error("error while deleting content from solr: " + e.getMessage)
}
}

try {
@@ -326,7 +328,7 @@ class SolrEngine(private val url: String)(@transient override implicit val ac: S
} catch {
case e: Exception => {
log.error("error while dropping solr container: " + e.getMessage)
Failure(e)
Failure(e)
}
}
}

0 comments on commit 6f2553f

Please sign in to comment.
You can’t perform that action at this time.