• Resolved James Joseph Finn

    (@jamesjosephfinn)


    Hello Patrick. Hope you’re well. Longtime pro user here. I’m wondering on the compatibility of the Typesense plugin. I know there’s already an Algolia integration, but I want to give self-hosted Typesense a go on this project. Thanks for your time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @jamesjosephfinn,

    thanks for reaching out!

    I’ll put that on my backlog for testing.
    While Algolia works, I’m also not particularly happy with their latest developments.

    The pricing approach was always somewhat opaque, but the recent SDK changes and the requirement to have at least PHP 8.1 have made it even more challenging, as we still have many users working with PHP 7+.

    Did you run a test with that? I wonder if it just works?

    Cheers,
    Patrick

    Thread Starter James Joseph Finn

    (@jamesjosephfinn)

    Greetings sir @patrickposner!

    I will be running tests shortly, yes. In this WP support forum post, one of the project maintainers indicated that their architectural decisions most likely align with static output. I’ll be sure to report my findings here!

    Plugin Author patrickposner

    (@patrickposner)

    @jamesjosephfinn,

    that would be great – please keep me updated!

    If that works out of the box, we happily add that to our “supported plugins” database (on the website and inside the plugin!)

    Thread Starter James Joseph Finn

    (@jamesjosephfinn)

    Greetings @patrickposner

    Next on my list is running this test; on which I’ve promised to keep you posted.

    In the interim, I wanted to let you know about my review of this offload media plugin, which proved to be fully compatible with SimplyStatic in my tests. As a token of my appreciation to the developer, I’ll also suggest giving it a place in your docs. There’s nothing else like it on the market that even comes close, IMO … and the price can’t be beat.

    Edit: Another quick question while I’m here: Presumably, the new UI switch “Workflow >> Use Auto Export?” is the same as the old add_filter( 'ssp_single_auto_export', '__return_true' );? I’m asking because I was expecting that to be switched on with this filter active, but that’s not the case.

    • This reply was modified 1 week, 5 days ago by James Joseph Finn. Reason: Additional question
    Thread Starter James Joseph Finn

    (@jamesjosephfinn)

    @patrickposner greetings.

    In addition to the above note regarding the excellent Advanced Media Offloader, I can now confirm that the Search With Typesense plugin also works flawlessly with SimplyStatic right out of the box. I spun up a Typesense server using docker; added my Typesense server API keys to the Typesense settings in WP-Admin; embedded their default shortcode onto a test page; ran a SimplyStatic export; and voilà, it works impeccably! (Bye-bye Algolia ✌🏼)

    Please add both of these outstanding pieces of open-source software to your list of compatible / recommended plugins.

    EDIT: The search results link back to WordPress URLs! Duh! I’ll post back shortly with the workaround. Hoping there’s an easy way to filter the Typesense index. Standby…

    • This reply was modified 4 days, 15 hours ago by James Joseph Finn. Reason: Some further hacking required. Standby
    Thread Starter James Joseph Finn

    (@jamesjosephfinn)

    Success! This snippet to filter the permalink before it gets indexed:

    /**
    * Filter Typesense document data before it is indexed.
    **/

    add_filter( 'cm_typesense_data_before_entry', function( $formatted_data, $raw_data, $object_id ) {
    if ( isset( $formatted_data['permalink'] ) ) {
    $formatted_data['permalink'] = str_replace(
    'https://wp.example.com',
    'https://example.com',
    $formatted_data['permalink']
    );
    }

    return $formatted_data;
    }, 10, 3 );

    And that’s all there is to it. 7 lines, and Typesense is thereby made fully compatible with SimplyStatic.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.