Enabling Search and Indexing for Guestbooks

In this section, you first create an indexer for guestbooks. You then modify the service layer to use this indexer to update the search index when a guestbook is persisted:

  1. Create a GuestbookIndexer class that extends Liferay’s BaseIndexer abstract class.

  2. Update GuestbookLocalServiceImpl’s addGuestbook, updateGuestbook, and deleteGuestbook methods to invoke the guestbook indexer.

Since there’s no reason to search for guestbooks in the UI, only the back-end work is necessary.

Let’s Go!

« Leveraging SearchUnderstanding Search and Indexing »
Was this article helpful?
0 out of 1 found this helpful