留言板

Liferay 7 Search Non-Liferay Indexes in Elasticsearch

thumbnail
William Gosse,修改在7 年前。

Liferay 7 Search Non-Liferay Indexes in Elasticsearch

Liferay Master 帖子: 533 加入日期: 10-7-4 最近的帖子
Is there a way to search non-liferay indexes and types that may exist in the same Elasticsearch cluster that Liferay is configured for using Liferay's search portlet? Essentially I want to search for content in non-liferay sites as well as Liferay sites. These other sites could be in Wordpress and Sharepoint.
thumbnail
David H Nebinger,修改在7 年前。

RE: Liferay 7 Search Non-Liferay Indexes in Elasticsearch

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
You'd implement an OpenSearch class to handle exposing non-Liferay entities in the Liferay search results.
thumbnail
William Gosse,修改在7 年前。

RE: Liferay 7 Search Non-Liferay Indexes in Elasticsearch

Liferay Master 帖子: 533 加入日期: 10-7-4 最近的帖子
Is there an example of this somewhere and is the same OpenSearch that's described here: http://www.opensearch.org/Home
thumbnail
David H Nebinger,修改在7 年前。

RE: Liferay 7 Search Non-Liferay Indexes in Elasticsearch

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Sorry, William, the names are the same but they are completely different.

In Liferay, OpenSearch is just an interface, com.liferay.portal.kernel.search.OpenSearch. You create an OpenSearch implementation to handle the grunt work of the search, and the methods return a String which is actually an XML doc string that contains hit details.

Liferay actually provides some helper classes here, check out the BaseOpenSearchImpl and HitsOpenSearchImpl classes for some abstract class support, and for implementation examples look at MBOpenSearchImpl, WikiOpenSearchImpl, or any of the many other portal-based OpenSearch implementations.