File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -437,14 +437,8 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
437437 // Perform recursion first if necessary
438438 if (recursive) {
439439 files.get(dataset.files).found.foreach(f => index(f, idx))
440- for (folderid <- dataset.folders) {
441- folders.get(folderid) match {
442- case Some (f) => {
443- files.get(f.files).found.foreach(fi => index(fi, idx))
444- }
445- case None => Logger .error(s " Error getting file $folderid for recursive indexing " )
446- }
447- }
440+ for (f <- folders.findByParentDatasetId(dataset.id))
441+ files.get(f.files).found.foreach(fi => index(fi, idx))
448442 }
449443 index(SearchUtils .getElasticsearchObject(dataset), idx.getOrElse(nameOfIndex))
450444 }
Original file line number Diff line number Diff line change @@ -1409,7 +1409,7 @@ class MongoDBDatasetService @Inject() (
14091409
14101410 def indexAll (idx : Option [String ] = None ) = {
14111411 // Bypass Salat in case any of the file records are malformed to continue past them
1412- Dataset .dao.dataset .find(MongoDBObject (), MongoDBObject (" _id" -> 1 )).foreach(d => {
1412+ Dataset .dao.collection .find(MongoDBObject (), MongoDBObject (" _id" -> 1 )).foreach(d => {
14131413 index(new UUID (d.get(" _id" ).toString), idx)
14141414 })
14151415 }
You can’t perform that action at this time.
0 commit comments