Difference between revisions of "Search Crawler"

From SocialStack
(Created page with "The search crawler module will crawl any pages within the site and fire events passing the rendered content, this is currently used by the elastic search module but could also...")
 
Line 7: Line 7:
You can also hide components from the crawler by checking for the value of <code>window.SERVER</code>, so for example you might want to hide footers if they contain links to site sections
You can also hide components from the crawler by checking for the value of <code>window.SERVER</code>, so for example you might want to hide footers if they contain links to site sections


<code>
<code>if (window.SERVER) {return;}</code>
if (window.SERVER) {
  return;
}
</code>

Revision as of 12:03, 28 February 2023

The search crawler module will crawl any pages within the site and fire events passing the rendered content, this is currently used by the elastic search module but could also be used to create dynamic sitemaps

The crawler runs by locale so you will get events fired for each page/locale allowing for indexing by language

The crawler extends the pages with a "Exclude From Search" flag, so in the admin panel any relevant pages can be ignored by the crawler, this is useful for pages which have links to content but should not be searchable such as 404 pages etc

You can also hide components from the crawler by checking for the value of window.SERVER, so for example you might want to hide footers if they contain links to site sections

if (window.SERVER) {return;}