Wilr\SilverStripe\Algolia\Service\AlgoliaPageCrawler
Fetches the main content off the page to index. This handles more complex templates. Main content should be low-weighted as depending on your front-end the <main> element may contain other information which should not be indexed.
Synopsis
class AlgoliaPageCrawler
{
- // members
- private $item;
- private static string $content_xpath_selector = '';
- private static string $content_element_tag = 'main';
- // methods
- public void __construct()
- public void getMainContent()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Tasks
Line | Task |
---|---|
28+ | allow filtering |
Members
private
- $content_element_tag — string
- $content_xpath_selector
—
string
Defines the xpath selector for the first element of content that should be indexed. If blank, defaults to the `main` element - $item