Search and Indexing

The Guestbook and Guestbook Admin portlets are up and running. The Guestbook portlet lets users add, edit, delete, and configure permissions for Guestbook Entries. The Guestbook Admin portlet lets Site administrators create, edit, delete, and configure permissions for Guestbooks. In the case of a very popular event (maybe a Lunar Luau dinner at the Lunar Resort), there could be many Guestbook Entries in the portlet, and users might want to search for Entries that mentioned the delicious low-gravity ham that was served (melts in your mouth). Searching for the word ham should display these Entries. In short, Guestbook Entries must be searchable via a search bar in the Guestbook portlet.

To enable search, you must index Guestbooks and their Entries. Although you probably won’t have enough Guestbooks in a Site to warrant searching the Guestbook Admin portlet, indexing Guestbooks has other benefits. In a later section, you’ll asset-enable Guestbooks and Guestbook Entries so the Asset Publisher can display them. Enabling search is a prerequisite for this—you must index any entity that you want to make an asset.

But assets are for later. Right now it’s time to index those Guestbooks. Ready?

Figure 1: Add a search bar so users can search for Guestbook Entries. If a message or name matches the search query, the Entry is displayed in the search results.

Figure 1: Add a search bar so users can search for Guestbook Entries. If a message or name matches the search query, the Entry is displayed in the search results.

Let’s Go!

« Checking for Permission in JSPsEnabling Search and Indexing for Guestbooks »
Was this article helpful?
0 out of 0 found this helpful