私は2つの単純なドメインを持っています:
public class Hotel {
static searchable = true
Source source
City city
HotelType type
long sourceid
float lat
float lon
static hasMany = [hotelTexts:HotelText]
static mapping = {
hotelTexts batchSize:10
}
}
public class HotelText {
static searchable = true
static belongsTo = [hotel:Hotel]
String lang
String name
String description
String address
static mapping = {
batchSize:10
description type:"text"
}
}
私は検索可能なプラグインにまったく慣れていませんが、それが私の問題を解決するのに役立つと信じています。したがって、タスクは都市でホテルを検索し、名前で結果を並べ替えることです。並べ替えなしで、動的ファインダーの助けを借りて簡単に行うことができますが...
概要:
- 都市別にホテルを検索します。
- 結果をホテル名(特定の言語)で並べ替えます。
- ページネーションをサポートします。