grails 2.3.4 と postgreSql データソースで検索可能なプラグインを使用します。クロージャーを使用してクエリを作成すると、プラグインは結果をレンダリングできません。
1) ドメイン テスト:
import org.compass.annotations.*
class Test implements Serializable {
static searchable = true
@SearchableProperty
Currency currency
@SearchableProperty
String type
2) searchableService を配線するサービス:
class SearchService {
def searchableService
def mysearch() {
def results = Test.search{
must(term('type', 'OFFICES'))
term('currency', 'USD')
}
return results
}
タイプと通貨のプロパティの文字列値「OFFICES」と「USD」を持つ十分に記録された Test エンティティにもかかわらず、クエリビルダーは結果を見つけることができません...