Yeah I understand, email would be best handled by a dedicated service

I'm a bit of a newbie on this though. What MTA do you use? You send a request to an external server which handles emails?

How do we setup SMTP in ss4 these days? In SS3 I used the email helpers module, which is now outdated

Huh, everything works fine when I create my own Index class like this:

  1. class SolrIndex extends ElementalSolrIndex
  2. {
  3. public function init()
  4. {
  5. $this->addClass(SiteTree::class);
  6. //$this->addAllFulltextFields();
  7. // fields to index
  8. //$this->addFulltextField('Content');
  9. $this->addFulltextField('Title');
  10. $this->addFulltextField('Content');
  11. $this->addFulltextField('MenuTitle');
  12. $this->addFulltextField('HeroPreTitle');
  13. $this->addFulltextField('HeroContent');
  14. $this->addFulltextField('Summary');
  15.  
  16. /** @see ElementalArea::getElementsForSearch */
  17. $this->addFulltextField('ElementsForSearch');
  18.  
  19. // dont index draft
  20. $this->excludeVariantState([SearchVariantVersioned::class => Versioned::DRAFT]);
  21. // respect ShowInSearch // TODO does not seem to work
  22. //$this->addFilterField('ShowInSearch');
  23. }

Or wait it seems no elemental blocks are index when saved, only when the parent page is saved