mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 16:41:35 -04:00
Fix boolean queries
This commit is contained in:
@@ -374,9 +374,13 @@ func formatQuery(q string) string {
|
||||
for _, part := range parts {
|
||||
fieldParts := strings.SplitN(part, ":", 2)
|
||||
if len(fieldParts) > 1 {
|
||||
cq += fieldParts[0] + ":" + strings.ToLower(fieldParts[1]) + " "
|
||||
value := fieldParts[1]
|
||||
if value != "T" && value != "F" {
|
||||
value = strings.ToLower(value) // do a lowercase query unless this is a boolean flag
|
||||
}
|
||||
cq += fieldParts[0] + ":" + value + " "
|
||||
} else {
|
||||
cq += part
|
||||
cq += part + " "
|
||||
}
|
||||
}
|
||||
return cq // Sophisticated field based search
|
||||
|
||||
Reference in New Issue
Block a user