Pregunta

Tengo dos dominios sencillos:

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"
    }
}

Estoy totalmente nuevo en el plugin de búsqueda, pero creo que me podría ayudar con mi problema. Por lo tanto, la tarea es encontrar Hoteles por la ciudad y después Ordenar resultados por: Nombre . Sin clasificación podría hacerse fácilmente con buscadores dinámicas ayudar, pero ...

Resumen:

  1. Buscar hoteles por ciudad.
  2. Ordenar resultados por: Nombre del hotel (para el lenguaje dado).
  3. Soporte de paginación.
¿Fue útil?

Solución

public class hotel {

static searchable = {
     hotelTexts component: true
}

...

}

HotelText public class {     = Investigables estáticas {          Nombre del impulso: 2.0     }

...

}

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top