You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement related to a problem? Please describe.
In #801, a new Smart 404 Feature was added. As mentioned in a comment, I think there are a few additional things we can look to do.
Add better check to ensure ElasticPress isn't just installed and active but is actually configured properly. I don't think we need to go so far as to check that our mapping exists (and thus a sync has run) but ensuring it's actually connected to elasticsearch before we allow the Feature to be set up would be nice. I'd suggest we look at the ElasticPress code to see if there's a helper function or method we can use
We have some helper functions that can be hardcoded into a theme's 404 template to render results but to better support FSE themes, would be nice to introduce a Smart 404 block
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Add better check to ensure ElasticPress isn't just installed and active but is actually configured properly. I don't think we need to go so far as to check that our mapping exists (and thus a sync has run) but ensuring it's actually connected to elasticsearch before we allow the Feature to be set up would be nice. I'd suggest we look at the ElasticPress code to see if there's a helper function or method we can use
If you simply want to check if the plugin connected to ES at some point in the recent past, you can use Elasticsearch::factory()->get_elasticsearch_version( false );, as seen here.
To check if a mapping exists, you can use Indexables::factory()->get( 'post' )->get_mapping() (which will actually send a request to ES) or Indexables::factory()->get( 'post' )->determine_mapping_version() to use a cached value.
Is your enhancement related to a problem? Please describe.
In #801, a new Smart 404 Feature was added. As mentioned in a comment, I think there are a few additional things we can look to do.
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: