Skip to content

Commit ba69293

Browse files
Max Burnettelmarini
authored andcommitted
When searching by metadata fields don't auto-lowercase metadata field names.
1 parent 155bca5 commit ba69293

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 1.7.3 - 2019-08-19
8+
9+
### Fixed
10+
- Fixed bug where metadata field names in the search box were being forced to lowercase, omitting search results due to
11+
case sensitivity.
12+
713
## 1.7.2 - 2019-08-01
814

915
### Fixed

app/services/ElasticsearchPlugin.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
143143
/** Search using a simple text string */
144144
def search(query: String, index: String = nameOfIndex): List[ResourceRef] = {
145145
val specialOperators = mustOperators ++ mustNotOperators
146-
val queryObj = prepareElasticJsonQuery(query.toLowerCase)
146+
val queryObj = prepareElasticJsonQuery(query)
147147

148148
try {
149149
val response = _search(queryObj, index)
@@ -174,7 +174,7 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
174174
datasetid: Option[String], collectionid: Option[String], spaceid: Option[String], folderid: Option[String],
175175
field: Option[String], tag: Option[String], index: String = nameOfIndex): List[ResourceRef] = {
176176

177-
var expanded_query = query.toLowerCase
177+
var expanded_query = query
178178

179179
// whether to restrict to a particular metadata field, or search all fields (including tags, name, etc.)
180180
val mdfield = field match {
@@ -852,11 +852,11 @@ class ElasticsearchPlugin(application: Application) extends Plugin {
852852
else
853853
currterm += mt+":"
854854
} else if (query.contains(":"+mt) || query.contains(":\""+mt+"\"")) {
855-
currterm += mt
855+
currterm += mt.toLowerCase()
856856
terms += currterm
857857
currterm = ""
858858
} else {
859-
terms += "_all:"+mt
859+
terms += "_all:"+mt.toLowerCase()
860860
}
861861
})
862862

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.7.2'
23+
release = '1.7.3'
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.7.2"
16+
val version = "1.7.3"
1717
val jvm = "1.7"
1818

1919
def appVersion: String = {

0 commit comments

Comments
 (0)