PTR-1890 revealed that the Federated Search Key/Alternate indexes documentation needs some additional details.
Extra or new example:
- Show a search page with 2 Results widgets: one configured for the Liferay Company Index (no config necessary), the other configured for a different index (liferay-0, for example).
- The Search Bar is configured to search both indexes with the same search term.
Cover these details:
- Logic for displaying results from an alternate index since there's no indexer summary to draw from:
- if only one field is configured, display it as the title
- if 2 fields, the first is the title(in bold and large text) and the second is the description)
- if more than 2 fields, the first is the title, and the rest are mashed up (field.value) in the second "description" field.
- If searching the liferay company index via low level search, no permission checking occurs
- not recommended
- might be okay for an admin-only search page
- scores calculated by Elasticsearch will only make sense in an intra-index fashion (so displaying a separate list of results for each index is recommended)