Forum Replies Created
-
wpsolrKeymaster5 years, 7 months ago in reply to: WP Solr not respecting Toolset views filters #25055
Do you see errors in WordPress debug.log, or in the chrome console?
wpsolrKeymaster5 years, 7 months ago in reply to: WP Solr not respecting Toolset views filters #25054Our Toolset 100K WooCommerce products is a Toolset archive. Looks like the pagination/filters are ok.
wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #25053Not sure it worked though.
You could try to use an index template to add the max_result_window at index creation time instead: https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html
You will need to create a new index in WPSOLR after.
wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #25007This probably explains why
PUT /my_index/_settings { "max_result_window" : 1000000 } }does not work. I tried it on my local Elasticsearch 7.x, and got the same issue.
It worked though on an Elasticsearch 6.x as described on my documentation.Strangely, the 7.x documentation of the update settings API states that it should work on all versions.
wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #25005Which Elasticsearch version is it?
wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #25002If the settings window size is set as expected, you should ask your Elasticsearch hosting provider support.
Elasticsearch is recommending not to increase the default value, as it is very resource intensive. Perhaps updating the setting on your index is not authorized?wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #25001Can you check your index settings with the same query with GET?
(In Kibana: GET /my_index/_settings)
wpsolrKeymaster5 years, 7 months ago in reply to: Modifying results content before it is displayed in autocomplete suggestions #24998You could instead apply your regex at indexing time. This would fix your display results for search and suggestions, but also improve your search relevance.
You can do it with event WPSOLR_FILTER_SOLARIUM_DOCUMENT_FOR_UPDATE as seen in /wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/woocommerce/class-wpsolr-plugin-woocommerce.php:
add_filter( WPSOLR_Events::WPSOLR_FILTER_SOLARIUM_DOCUMENT_FOR_UPDATE, [$this, 'add_fields_to_document_for_update',], 10, 5 );/** * Clean a document just before sending it to the index * @param array $document_for_update * @param $solr_indexing_options * @param $post * @param $attachment_body * @param WPSOLR_AbstractIndexClient $search_engine_client * * @return array Document updated with fields */ function add_fields_to_document_for_update( array $document_for_update, $solr_indexing_options, $post, $attachment_body, WPSOLR_AbstractIndexClient $search_engine_client ) { // Clean $document_for_update (....) return $document_for_update; }wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #24996Are you working with the same index in WPSOLR?
(the same “my_index” name in WPSOLR and in /my_index/_settings)wpsolrKeymaster5 years, 7 months ago in reply to: Large number of indexed products are not shown #24981Apply the cURL command described in /fix-elasticsearch-error-result-window-is-too-large/ to increase your index window size.
If you index is password protected, add parameter -u username:password
wpsolrKeymaster5 years, 7 months ago in reply to: WP Solr not respecting Toolset views filters #24980Is it an archive view, or a view?
wpsolrKeymaster5 years, 7 months ago in reply to: WP Solr not respecting Toolset views filters #24974But is the pagination issue solved?
wpsolrKeymaster5 years, 7 months ago in reply to: Yoast SEO documentation #24949The WPSOLR’s Yoast SEO addon documentation, finally: /guide/configuration-step-by-step-schematic/activate-extensions/yoast-seo-add-on/
wpsolrKeymaster5 years, 7 months ago in reply to: WP Solr not respecting Toolset views filters #24940My own tests look fine.
Can you check with a more recent version of WPSOLR, for instance https://trello.com/c/npiRNlmw/141-fix-wpml-strings-not-filled-with-wpsolr-localizations-in-recent-wpml-versions ?
wpsolrKeymaster5 years, 7 months ago in reply to: Custom sort order for facet items #24934Just be aware that sort would be performed on client-side only. Which means that if you do not display all facet items, the sort will be partially incorrect.
You can use WPSOLR’s facet data event
WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATAfor that.You can find an example in the Yoast add-on file, where permalinks are added to each facet url: /htdocs/wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/seo/class-wpsolr-option-seo.php.
/** * Modify the facets data at your convenience just before calling the Twig template for display * @param array $facets_data * @return array */ public function update_facets_data_skeleton( $facets_data ) { // Do something here on facets data $facets_data[...] = ...; return $facets_data; }