Fórum

How to display result of customized entries in default search portlet?

旻 吴, modificado 2 Meses atrás.

How to display result of customized entries in default search portlet?

Junior Member Postagens: 56 Data de Entrada: 17/05/17 Postagens Recentes
Hello everyone. I am trying to imply search and indexer to my customized entry called CustomizedSalesInformation(fields: title, details). The liferay version is DXP sp3. I have implemented the indexer class as well as search function in CustomizedSalesInformationLocalServiceImpl.java. I can see the generated document and summary when creating new CustomizedSalesInformation by log. The document of indexer contains the title and details.

I also have added the CustomizedSalesInformation to asset framework by calling assetEntryLocalService.updateAsset() when a new CustomizedSalesInformation is created.

Now the problem is, if I created a CustomziedSalesInformation with title="first information" and details="first details" and search for the keyword="first information" by the default search utility on the webpage, I can see

Asset Entries:
CustomizedSalesInformation(1)

on the left side of search result page. But if I click on the link of CustomizedSalesInformation, nothing happens. No result is shown on the right side of the default search portlet. I am wondering what do I miss? Thank you so much.

By the way:
I have a disucssion panel on the portlet of CustomizedSalesInformation with the codes below:
<liferay-ui:panel collapsible="<%= true %>" extended="<%= true %>" persiststate="<%= true %>" title="Comment:">
	<liferay-ui:discussion className="<%= CustomizedSalesInformation.class.getName() %>" classPK="<%= customizedSalesInformation.getDcInformationId() %>" formName="fm3" ratingsEnabled="false" hideControls="false" redirect="<%= currentURL %>" userId="<%= customziedSalesInformation.getUserId() %>" />
</liferay-ui:panel>

So I can append discussions to each customizedSalesInformation. But if I search for the content of discussions, it performs just the same as the search on CusotmizedSalesInformation. That is, one can see 'Message Boards Message (1)' on the left side of search result page but can not get any result by clicking the 'Message Boards Message (1)' link.
旻 吴, modificado 2 Meses atrás.

RE: How to display result of customized entries in default search portlet?

Junior Member Postagens: 56 Data de Entrada: 17/05/17 Postagens Recentes
Hello everyone. I finally found that to make a model to an asset, I should add status, statusByUserId/Name/Data to service.xml. Just add it to the assetentry table is not enough.