I created a basic app (Grails 1.3.5, Searchable 0.5.5.1) with your two classes and searching for 'country:NL' works for me. Did you remember to call index() before trying to search?
grails create-app search
grains install-plugin searchable
Person:
class Person {
static searchable = {
address component: true
}
Address address
}
Address:
class Address {
static belongsTo = Person
static searchable = {
root false
}
String country
}
Bootstrap:
class BootStrap {
def init = { servletContext ->
def p1 = new Person(address:new Address(country:'NL')).save()
def p2 = new Person(address:new Address(country:'DE')).save()
def p3 = new Person(address:new Address(country:'NZ')).save()
Person.index()
}
def destroy = {
}
}
Then I browsed to to /searchable and searched for country:NL and got person 1 returned.
If you want to see what Searchable is doing under the covers with regards to fields/indexes etc - Luke is a very handy tool (just download the executable JAR): http://code.google.com/p/luke/
The index files are in
<user.home>/.grails/projects/<project name>/searchable-index/development/index
cheers
Lee