Donnerstag Mrz 25, 2010
Roolastic - Part Three
Now that we have our little webapp running and we can add images to it and they get indexed, we need a way to query the index.
So we quickly create a SearchController by running
then we add a little search form to the index view, create a new view for the results (don't forget to adapt the tiles config in views.xml) and implement the controller logic for stuffing the result in our model like here.
controller class --class ~.web.SearchController
I've done a couple of things here:
- I put a JSON expression into the search field to give you a head start
- I implemented two different controller methods linked to the two different search buttons. One just stuffs the json coming back from elasticsearch into the model and one deserialises the returned results back into entity instances and stuffs those into the model
Posted at 01:35PM Mrz 25, 2010 by joerg in Allgemein |
Kommentare: