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 »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 1