Users can search for specific content via the search box, and P4 will pull out results from documents, posts, pages, campaigns or archives.

📚 Manage Planet 4 > Administration > Search

All Planet 4 sites are powered by Elastic Search, an open-source engine providing scalable, near real-time and multi-tenancy crawls. Elastic Search allows P4 to incorporate 3rd parties crawls, and will be super useful in the future, for instance to include Archived P3 sites in the search results.


The search results page

Anytime one or more terms are inserted in the search box, Elastic Search will pull out a page with the following url structure:

Here’s an example > https://www.greenpeace.org/new-zealand/?s=Polar+bear&orderby=_score

By default, Take Action pages and Campaigns pages are the first ones displayed into the results, as the most relevant content. Posts are also pulled out right after, showing their Post type, #Tags and Excerpt.

Filters

On the left side of the search results page, users can refine search according to:

>> one or more Issues (Aka Categories)

>> one or more Campaigns (Aka #Tags)

>> one or more Categories (Aka Post types)

>> one or several content type (pages, documents, etc)

By selecting a filter, a query will be added to the url, for example, if to our previous search results page we add the “#Forest” Tag, the result will be:

https://www.greenpeace.org/domain/?s=KEY1+KEY2+KEY3&orderby=_score&f%5Btag%5D%5BForests%5D=20

An “Archive” filter will also be available in case Admins decide to include Archived content in Search pages (see below at #integration-with-archived-content)


Search weight in Posts / Pages

As mentioned,, Take Action pages are pulled out first, with default weight 2000, then Pages with default weight 100 and then the rest of the Posts. Editors can, however, manually determine the search weight of the page / post (See create Posts & Pages).

The Search function will present first posts or pages with the higher search weight.


It is possible to include Archived content from the Greenpeace collection in the Internet Archive among the P4 search results, allowing users to access historical content from P3 (or previous versions of Greenpeace websites).

How “Archived” content is presented among P4 Search results

🤔 Key Info : This is a Minimum Viable Product of the basic integration of Greenpeace archives into P4. Help the team improve it by adding your requirements!

🤔 Key Info : Only “publishedArchived content are included in P4 Search results. You can Include / Exclude specific Archived posts / pages from Settings > Archive > All Archived Content

in Settings > Archive > All Archived Content you can decide which content will be included in the P4 Search

In Settings > Archive > All archived posts, all p3 content is marked with “[email protected]” as creator. This is an auto-generated profile that gets assigned as author of all p3 archived content, with the lowest (subscriber) permissions role.

The Archiveuser is auto-generated and gets the lowest permission rights in your P4 site

This profile is not going to perform any action, but if you if you try to delete the “[email protected]” user, you’ll get a prompt to re-assign the archive posts authorship.

🤔 Key Info : Content that was migrated to P4 during implementation is not available among the Archived Content, to avoid duplicates


P4 Administrators can choose to include content from the Greenpeace collection of the Internet Archive among Planet 4 search results.

🤔 Key Info : By default, the Archive content integration is OFF.

🤔 Key Info : By enabling this option, content from the Greenpeace collection of the Internet archived will be included in P4 search results

As a P4 Administrator go to Settings > Planet 4, and locate the command to turn on / off the Archive integration for specific users.

TIP – We recommend making the archived results available first for the logged in users and run some test. Then the archived content can be included for all users.


Archived Search results are presented as follows:

  1. Include Title, date of original publication and description (if applicable)  
  2. Will open in a new tab (users will be leaving P4) 
  3. With an “Archive” green label
  4. Without taxonomy (no #Tags or Categories) 
  5. Without featured image
  6. Archived search results should be pulled out from the same instance of the Wayback machine in the same instance of P4
  7. For multilingual sites, archived search results should be pulled out in the same language of the Wayback machine into the same language of the P4 search results

If the setting to Include archived content in Search for… is checked, users performing a search will be presented the option to include archived content among the P4 search results or not. Here’s how this will happen:

‘Archive’ content type selected, only archived content is being displayed

‘Archive’ content type not selected, archived content will be displayed lower on pages. The results consider the relevancy of all the content available on P4

Search keys, subdirectories and language variations will be maintained when browsing the WayBack Machine archive subdirectory. This means that:


Test the archive integration

We recommend to run some tests before activating the “Archived content” integration for all users.

For all sites

  1. Activate the Archive Integration setting in your Release site (e.g. https://release.k8s.p4.greenpeace.org/YOUR-NRO)
  2. Search for broad keywords (e.g. “Arctic”, “Amazon” and “Nestle”)
  3. Search for very specific keywords (e.g. “Munduruku”, “Generali”, “Kriza” or any related to a term in your site’s taxonomy)

Expected results:

Make sure the content follows the rules from the section above “How archived content is presented

👉👉👉 Not working? Please report a bug 🐞

For multi-language sites

  1. Activate the Archive Integration setting in your Release site (e.g. https://release.k8s.p4.greenpeace.org/YOUR-NRO)
  2. Search for broad keywords (e.g. “Arctic”, “Amazon” and “Nestle”) in all language versions
  3. Search for very specific keywords (e.g. “Munduruku”, “Generali”, “Kriza” or any related to a term in your site’s taxonomy) in all language versions

Expected results:

👉👉👉 Not working? Please report a bug 🐞


As Admin, go to Settings > ElasticPress.

The ElasticSearch host is `http://p4-es-elasticsearch-client.default.svc.cluster.local:9200/` and should automatically be set for all P4 sites.

If this is not configured in your site, insert the host above then hit “Sync”, leaving all the search settings enabled. This will create an index of the pages/posts/documents that exist in the currently used language.

🤔 Key Info : For Multilingual NRO sites you will need to run a “Sync” for each one of the available languages. So, you will need to change language in the admin panel and do it again.

Questions or doubts? Contact the P4 team.

EalsticPress settings are very easy top manage, with drop-downs and sync commands

ElasticSearch intro video

Check the official Elastic site or watch the video below to learn more about what Elastic Search does..


Advanced config – tech documentation

Are you a Dev / ElasticSearch specialist? Check this page to learn how Planet4 uses it and how you can do advanced customisation.


Links & Resources