Foros de discusión
Search Indexing In Liferay 7.
Thirumal Reddy, modificado hace 7 años.
Search Indexing In Liferay 7.
Regular Member Mensajes: 216 Fecha de incorporación: 3/12/15 Mensajes recientes
Hi All,
I created a Site Template of 25 pages, and I created an organization from control panel by choosing that SiteTemplate, now there is no problem
and i now want create an organization based on choosen site template by the code. i did that.
but the problem is , when i try to create an organization by the code, the organization details are storing database but the organzation is not displaying in control panel.
if i do the reindex, then the organization is showing in control panel.
for every time reindex is not good approach right?
and if keep below properties in portal-ext.prop file and create an organization, then newly created organization is showing in control panel.
Is it a sol'n? or is there any other alternative approach?
Thanks,
Thirumal.
I created a Site Template of 25 pages, and I created an organization from control panel by choosing that SiteTemplate, now there is no problem
and i now want create an organization based on choosen site template by the code. i did that.
but the problem is , when i try to create an organization by the code, the organization details are storing database but the organzation is not displaying in control panel.
if i do the reindex, then the organization is showing in control panel.
for every time reindex is not good approach right?
and if keep below properties in portal-ext.prop file and create an organization, then newly created organization is showing in control panel.
index.on.startup=true
users.search.with.index=false
organizations.search.with.index=false
Is it a sol'n? or is there any other alternative approach?
Thanks,
Thirumal.
Jorge Díaz, modificado hace 7 años.
RE: Search Indexing In Liferay 7.
Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
Organizations are searched in index unless you deactive it using organizations.search.with.index=false
So I think your problem is you are not indexing the new organization in your custom code.
In your custom code, after creating the organization from site template, you have to call the indexer.
Another option is an error during indexation process, check log file for errors.
Regards
So I think your problem is you are not indexing the new organization in your custom code.
In your custom code, after creating the organization from site template, you have to call the indexer.
Another option is an error during indexation process, check log file for errors.
Regards
Thirumal Reddy, modificado hace 7 años.
RE: Search Indexing In Liferay 7.
Regular Member Mensajes: 216 Fecha de incorporación: 3/12/15 Mensajes recientes
Hi Jorge,
i didn't writen any custom logic, just called addOrganization(long userId, long parentOrganizationId, String name, String type,long regionId, long countryId, long statusId, String comments,boolean site, ServiceContext serviceContext)
internally it automatically calls indexing. so no need to call the indexer
and it is happening for only one site template which contains 25 pages with 20mb size.
and for other site templates it's working fine. and after reindexing, 25 pages site template organizarion also showing in control panel.
so at this situation what to do resolve this issue?
is there any problem with size and no. of pages of site template?
Thanks,
Thirumal.
i didn't writen any custom logic, just called addOrganization(long userId, long parentOrganizationId, String name, String type,long regionId, long countryId, long statusId, String comments,boolean site, ServiceContext serviceContext)
internally it automatically calls indexing. so no need to call the indexer
and it is happening for only one site template which contains 25 pages with 20mb size.
and for other site templates it's working fine. and after reindexing, 25 pages site template organizarion also showing in control panel.
so at this situation what to do resolve this issue?
is there any problem with size and no. of pages of site template?
Thanks,
Thirumal.
Jorge Díaz, modificado hace 7 años.
RE: Search Indexing In Liferay 7.
Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
About:
How are you calling addOrganization?
Is there any exception or error in log?
Thirumal Reddy:
i didn't writen any custom logic, just called addOrganization(long userId, long parentOrganizationId, String name, String type,long regionId, long countryId, long statusId, String comments,boolean site, ServiceContext serviceContext)
internally it automatically calls indexing. so no need to call the indexer
How are you calling addOrganization?
Is there any exception or error in log?
Thirumal Reddy, modificado hace 7 años.
RE: Search Indexing In Liferay 7.
Regular Member Mensajes: 216 Fecha de incorporación: 3/12/15 Mensajes recientes
Hi Jorge,
OrganizationLocalServiceUtil.addOrganization(-,-,-,..);
No there are no errors
To resolve this what i did is,written below logic,
after applying site template to organization,
this time it's working fine,
can i do this thing..?
Thanks,
Thirumal
How are you calling addOrganization?
OrganizationLocalServiceUtil.addOrganization(-,-,-,..);
Is there any exception or error in log?
No there are no errors
To resolve this what i did is,written below logic,
Indexer<organization> indexer =
IndexerRegistryUtil.nullSafeGetIndexer(Organization.class);
indexer.reindex(organization);
</organization>
after applying site template to organization,
SitesUtil.updateLayoutSetPrototypesLinks(organization.getGroup(), publicLayoutSetPrototypeId,privateLayoutSetPrototypeId,publicLayoutSetPrototypeLinkEnabled,privateLayoutSetPrototypeLinkEnabled);
this time it's working fine,
can i do this thing..?
Thanks,
Thirumal
Jorge Díaz, modificado hace 7 años.
RE: Search Indexing In Liferay 7.
Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
Hi Thirumal,
Seems that method public Organization addOrganization(...) only calls indexer in case of having serviceContext == null or serviceContext.isIndexingEnabled() == true
See:
You can also try activating debug traces for indexing logic (categories with 'search' word)
Seems that method public Organization addOrganization(...) only calls indexer in case of having serviceContext == null or serviceContext.isIndexingEnabled() == true
See:
if ((serviceContext == null) || serviceContext.isIndexingEnabled()) {
Indexer<organization> indexer =
IndexerRegistryUtil.nullSafeGetIndexer(Organization.class);
indexer.reindex(organization);
}</organization>
Check the serviceContext parameter.You can also try activating debug traces for indexing logic (categories with 'search' word)