Skip to content

Commit 8266c0d

Browse files
committed
Merge branch 'develop' into CATS-1055-remove-dataset-from-space-button-is-confusing
2 parents 6107946 + 52731ea commit 8266c0d

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ of these changes a reindex of Elasticsearch is required. This can be started by
2525
- When adding tags to a section of an image, show the new tag without having to refresh the page.
2626
[CATS-1053](https://opensource.ncsa.illinois.edu/jira/browse/CATS-1053)
2727

28+
## 1.8.4 - 2020-05-15
29+
**_Warning:_ This update modifies how information is stored in Elasticsearch for text based searching. To take advantage
30+
of these changes a reindex of Elasticsearch is required. This can be started by an admin either from GUI or through the API.**
31+
32+
### Fixed
33+
- Fixed a bug related to improper indexing of files in nested subfolders, which could also affect searching by parent dataset.
34+
2835
## 1.8.3 - 2020-04-28
2936
**_Warning:_ This update modifies how information is stored in Elasticsearch for text based searching. To take advantage
3037
of these changes a reindex of Elasticsearch is required. This can be started by an admin either from GUI or through the API.**

app/services/ElasticsearchPlugin.scala

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,8 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
441441
// Perform recursion first if necessary
442442
if (recursive) {
443443
files.get(dataset.files).found.foreach(f => index(f, idx))
444-
for (folderid <- dataset.folders) {
445-
folders.get(folderid) match {
446-
case Some(f) => {
447-
files.get(f.files).found.foreach(fi => index(fi, idx))
448-
}
449-
case None => Logger.error(s"Error getting file $folderid for recursive indexing")
450-
}
451-
}
444+
for (f <- folders.findByParentDatasetId(dataset.id))
445+
files.get(f.files).found.foreach(fi => index(fi, idx))
452446
}
453447
index(SearchUtils.getElasticsearchObject(dataset), idx.getOrElse(nameOfIndex))
454448
}

app/util/SearchUtils.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,16 @@ object SearchUtils {
2626

2727
// Get child_of relationships for File
2828
var child_of: ListBuffer[String] = ListBuffer()
29-
datasets.findByFileIdDirectlyContain(id).map(ds => {
29+
// ...first, the dataset which contains the file or its folder
30+
datasets.findByFileIdAllContain(id).map(ds => {
3031
child_of += ds.id.toString
3132
ds.spaces.map(spid => child_of += spid.toString)
3233
ds.collections.map(collid => child_of += collid.toString)
3334
})
34-
val folderlist = folders.findByFileId(id).map(fld => {
35+
// ...second, the immediate parent folder ID (and the folder's parent) itself
36+
folders.findByFileId(id).map(fld => {
3537
child_of += fld.id.toString
3638
child_of += fld.parentDatasetId.toString
37-
fld.id
38-
})
39-
datasets.get(folderlist).found.foreach(ds => {
40-
child_of += ds.id.toString
41-
ds.spaces.map(spid => child_of += spid.toString)
42-
ds.collections.map(collid => child_of += collid.toString)
4339
})
4440
val child_of_distinct = child_of.toList.distinct
4541

doc/src/sphinx/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
author = 'Luigi Marini'
2121

2222
# The full version, including alpha/beta/rc tags
23-
release = '1.8.3'
23+
release = '1.8.4'
2424

2525

2626
# -- General configuration ---------------------------------------------------

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import NativePackagerKeys._
1313
object ApplicationBuild extends Build {
1414

1515
val appName = "clowder"
16-
val version = "1.8.3"
16+
val version = "1.8.4"
1717
val jvm = "1.7"
1818

1919
def appVersion: String = {

0 commit comments

Comments
 (0)