Can Plone search be configured to see portlet content?
Asked Answered
E

1

28

I just now realized that Plone search doesn't "see" content that is in portlets, after adding about a million static text portlets to a new website. Is there anyway it can be configured to access that content also?

Test example, search for "Gwynn" on our CA&ES site in development:

However "Gwynn" shows up in a portlet on this page.

The only other solution I can think of is to use "Content portlets" instead, and switch all those "static text" portlets to pages... Not ideal though, because the search result would pull that "content page" instead of the actual page where the portlet is displayed.

This website is running on Plone 4.3.

Elboa answered 19/8, 2013 at 18:26 Comment(3)
Portlets are not contentish types, therefore they are not indexed. I know this usecase, but we solved it by putting content per drag'n'drop into a portlet area, but it's still an AT object. the text content will be indexed into its parent. [Check] (github.com/4teamwork/ftw.contentpage). You could patch the searchable_text index and grab all statictext portlets and append the text to the searchable_text of the current object.Sacrament
Creating a package to do this might be a fun one-day sprint for the Davis group.Incised
That can be done within a day..?! Sounds good to me, maybe later this fall? :)Elboa
T
2

if you're using portal_catalog or a supported search engine plugin collective.solr, ... i'd recommend you implement a custom indexer for your fulltext index, which also reads the fulltext out of annotation storage and submits it to the index. This should be quite easy, example see Plone documentation: https://docs.plone.org/4/en/develop/plone/searching_and_indexing/indexing.html#full-text-searching

Truncate answered 4/4, 2017 at 12:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.