Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ registration or heartbeat to Clowder that will restrict use of that extractor to
## Fixed
- Updated lastModifiesDate when updating file or metadata to a dataset, added lastModified to UI [386](https://github.com/clowder-framework/clowder/issues/386)
- Disabled button while create dataset ajax call is still going on [#311](https://github.com/clowder-framework/clowder/issues/311)
- Fixed bug where complex JSON metadata objects using arrays were not being indexed properly for search.


## 1.21.0 - 2022-08-23
Expand Down
10 changes: 4 additions & 6 deletions app/services/ElasticsearchPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
case jv: JsArray => {
builder.startArray(clean_k)
jv.value.foreach(subv => {
builder.value(subv.toString.replace("\"",""))
builder.value(convertJsObjectToBuilder(builder, subv.asInstanceOf[JsObject]))
})
builder.endArray()
}
Expand Down Expand Up @@ -598,11 +598,9 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
// Elasticsearch 2 does not allow periods in field names
builder.startArray(k.toString.replace(".", "_"))
v.value.foreach(jv => {
// Try to interpret numeric value from each String if possible
parseDouble(jv.toString) match {
case Some(d) => builder.value(d)
case None => builder.value(jv)
}
builder.startObject()
convertJsObjectToBuilder(builder, jv.asInstanceOf[JsObject])
builder.endObject()
})
builder.endArray()
}
Expand Down