WPSolr logo
Search
Close this search box.

Forum Replies Created

  • mneimne
    Participant
    1 year, 11 months ago in reply to: Posts per page #29708

    Bumping an old thread, but thought this might benefit someone.

    Here is how I did it
    `if ( defined( ‘WPSOLR_PLUGIN_SHORT_NAME’ ) ) {
    add_action( WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY, function () {
    //default per page 100
    $per_page = 100;
    //read from URL string
    if(isset($_GET[‘per_page’]) && is_int((int)$_GET[‘per_page’]))
    $per_page = $_GET[‘per_page’];

    $search_engine_client = WPSOLR_Service_Container::get_solr_client();
    $query_object = WPSOLR_Service_Container::get_query();
    $query_object->wpsolr_set_nb_results_by_page($per_page);
    $search_engine_client->search_engine_client_set_rows( $per_page );
    }
    } );
    }

    mneimne
    Participant

    So, if I am using only elasticsearch to index my data, without using the AI, I am safe to proceed with fix I did (removing the jwt manually)?

    mneimne
    Participant

    It turns out AAM requires php-jwt v5, whereas WPSolr is using v6. I renamed the folder of php-jwt inside wpsolr to resolve the issue temporarilyz the question is, where is this library used in WPSolr.
    Thanks

    mneimne
    Participant

    update: when a JWT token is generated from AAM plugin, debug.log shows this line:
    wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/firebase/php-jwt/src/JWT.php on line 428

    mneimne
    Participant

    Hello
    I followed your guide on how to make Elasticsearch return more than 10,000 results, however it doesn’t seem to be working, always 10K results are returned.
    Knowing that the settings API call on that index indicates that this value was set to more than 10K.
    Elasticsearch version 7.6.2

    mneimne
    Participant

    Thanks, the fix seems to be working.
    Another question, I followed your guide on how to make Elasticsearch return more than 10,000 results, however it doesn’t seem to be working, always 10K results are returned.
    Knowing that the settings API call on that index indicates that this value was set to more than 10K.
    Elasticsearch version 7.6.2

    mneimne
    Participant

    I checked the demos found on the website, and it seems they all have this issue
    check out this link for a category archive : https://demo-woocommerce-flatsome-cloudways-million-products.wpsolr.com/product-category/slumber-bags/

    it doesn’t show the categories in the facets, only in the search page. Thought this might help.

    mneimne
    Participant

    Category facets will only be displayed in the category page if I selected “select to display the facet as tree”, but then the filtering won’t work all results will be fetched.
    https://pasteboard.co/szKvkQsYFA8e.png

    mneimne
    Participant

    The facets didn’t show up in the product category archive (https://pasteboard.co/hEH64x2OfutF.png)
    Although in the search they did (https://pasteboard.co/kc4LqR4wm7PM.png)

    mneimne
    Participant

    another finding in version 22.2 (no fix):
    If product_cat is enabled in Filters, it is shown correctly in the search page, and it doesn’t show in the product archive. To make the product category filter visible, I had to click on “Show categories as tree” which will make it visible in the product archive but it doesn’t work as expected

    is there a support portal that I can send my staging URLs to show you the issue.
    Thanks,

    mneimne
    Participant

    update: this is not related to the fix provided I was able to reproduce it on 22.2, I am checking the scenario, below are two logs
    1. query in search page (working):https://pastebin.com/paYiWRNK
    2. query in product archive page(not working): https://pastebin.com/ZAKEc2ZS

    mneimne
    Participant

    Hello,
    Did you have the chance to look at the attached files? Let me know if any clarification is needed.
    Thanks,

    mneimne
    Participant

    1. link to query in product archive page: https://pastebin.com/YsMiiiZq
    2. link to query in search page: https://pastebin.com/aWqPk4yu

    notice how non_flat_hierarchy_product_cat_str is not populated correctly in # 1

    mneimne
    Participant

    Hello again
    I noticed a bug in the fix you shared, below are the steps to reproduce:
    1. Install wpsolr fix in the link you sent
    2. enable facets
    3. got to a product cateogry
    4. filter by category from the facets
    5. The results are the same, no filtering is done. (the product category filtering is working in the search page as expected.

    Note: I confirmed this bug in the patch by installing the official 22.2 without patches and it is working find when it comes to facets.

    mneimne
    Participant
    2 years ago in reply to: Facets are not showing #29536

    a couple of questions

      The range filter is not available on the _price, anything I need to do?
      2. How can I sort by price asc/desc
Viewing 15 posts - 1 through 15 (of 32 total)