Forum Replies Created
- mneimneParticipant1 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 );
}
} );
}mneimneParticipant2 years ago in reply to: WPSolr Conflict with Advance Access Manager #29626So, 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)?
mneimneParticipant2 years ago in reply to: WPSolr Conflict with Advance Access Manager #29624It 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.
ThanksmneimneParticipant2 years ago in reply to: WPSolr Conflict with Advance Access Manager #29623update: 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 428mneimneParticipant2 years ago in reply to: Remove 10000 limit when using elasticsearch #29617Hello
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.2mneimneParticipant2 years ago in reply to: Order products by category priority #29614Thanks, 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.2mneimneParticipant2 years ago in reply to: Order products by category priority #29608I 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.
mneimneParticipant2 years ago in reply to: Order products by category priority #29607Category 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.pngmneimneParticipant2 years ago in reply to: Order products by category priority #29606The 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)mneimneParticipant2 years ago in reply to: Order products by category priority #29604another 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 expectedis there a support portal that I can send my staging URLs to show you the issue.
Thanks,mneimneParticipant2 years ago in reply to: Order products by category priority #29603update: 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/ZAKEc2ZSmneimneParticipant2 years ago in reply to: Order products by category priority #29590Hello,
Did you have the chance to look at the attached files? Let me know if any clarification is needed.
Thanks,mneimneParticipant2 years ago in reply to: Order products by category priority #295891. link to query in product archive page: https://pastebin.com/YsMiiiZq
2. link to query in search page: https://pastebin.com/aWqPk4yunotice how non_flat_hierarchy_product_cat_str is not populated correctly in # 1
mneimneParticipant2 years ago in reply to: Order products by category priority #29587Hello 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.
mneimneParticipant2 years ago in reply to: Facets are not showing #29536a 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