Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed #184

  • Loading branch information...
commit 86c53b292eedae139cfdabc57c59b1931535594a 1 parent fc32e01
Vladimir Orany musketyr authored
2  core/src/main/groovyx/gaelyk/extensions/SearchExtensions.groovy
View
@@ -117,7 +117,7 @@ class SearchExtensions {
switch (fields.size()) {
case 0:
- throw new GroovyRuntimeException("No such field '$fieldName' for document '$document'")
+ return null
case 1:
return getFieldRawValue(fields[0])
default:
1  core/src/test/groovyx/gaelyk/search/SearchShortcutsTest.groovy
View
@@ -60,6 +60,7 @@ class SearchShortcutsTest extends GroovyTestCase {
assert "red hook" in doc.keyword
assert !('nothing' in doc.fieldNames)
assert !('emptyList' in doc.fieldNames)
+ assert !doc.noSuchField
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.