WPSolr logo
Search
Close this search box.

Forum Replies Created

  • cbarwin
    Participant

    Thank you for the examples.
    Code below is working for some products while it does not seems to be working for others. Please help me what I am doing wrong here.

    function wpsolr_action_query( $parameters ) {
    $taxonomy_name = ‘pricetax’;
    /* @var WPSOLR_AbstractSearchClient $search_engine_client */
    $search_engine_client = $parameters[ WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY__PARAM_SOLARIUM_CLIENT ];
    $search_engine_client->search_engine_client_add_filter_not_in_terms( ‘post_pricetax_not_user_restrict’, “pricetax_str”, [ ‘PRICE1′,’PRICE2′,’PRICE3′,’PRICE4’ ] );
    }

    Thank You.

    cbarwin
    Participant

    Thank you for quick response.
    I am not able to get the desired results. Here is my code, its actually the code from mentioned article. Here, I am trying to pass the terms ‘PRICE1,PRICE2,PRICE3’ under taxonomy ‘pricetax’.

    function wpsolr_action_query( $parameters ) {
    $taxonomy_name = ‘pricetax’;
    /* @var WPSOLR_AbstractSearchClient $search_engine_client */
    $search_engine_client = $parameters[ WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY__PARAM_SOLARIUM_CLIENT ];
    /**
    * Create a “not exists” filter
    */

    $filter_not_exists_terms_in_taxonomy = $search_engine_client->search_engine_client_create_not($search_engine_client->search_engine_client_create_filter_exists($taxonomy_name . WpSolrSchema::_SOLR_DYNAMIC_TYPE_STRING));

    $search_engine_client->search_engine_client_add_filter(“not in PRICE1,PRICE2,PRICE3 {$taxonomy_name}”, $filter_not_exists_terms_in_taxonomy);
    }

    Is there any documentation for this to understand how these filters work.

    Thank You.

    cbarwin
    Participant

    Don’t worry I am not asking you why but I have checked in both Chrome and Firefox, it didn’t worked for me. I will ask hosting guys to look into it.

    cbarwin
    Participant

    I am still getting this error on Define your search tab.
    Also, I need to add a filter in result set based on logged-In user-meta which has comma separated custom taxonomy terms.
    This article https://www.wpsolr.com/forums/topic/filter-the-search-results-by-taxonomy/ is exactly what I need but other way around. I want to exclude items belong to given list of Taxonomy terms.

    cbarwin
    Participant
    1 year, 7 months ago in reply to: deleted items still showing in suggestions #31130

    It’s just updating the post_status in the index to “trash” — it’s not deleting it.

    cbarwin
    Participant
    1 year, 7 months ago in reply to: deleted items still showing in suggestions #31128

    I am having this same issue. We need a way to be able to remove items from the index programatically.

    cbarwin
    Participant
    2 years, 3 months ago in reply to: Range with Checkboxes Greater Than #28962

    I’m working with Elasticsearch. I was able to implement your suggestion to add a really large number for the range end value. The range with the * is still showing up as an option, and is still not working. I can hide it with CSS. Not a great fix; but it works.

    One last question — is it possible to assign “OR” logic across different facets?

    cbarwin
    Participant
    2 years, 3 months ago in reply to: Range with Checkboxes Greater Than #28955

    Why is it displaying the starting and ending ranges if they don’t work? Even if I specify a gap of 10, it’s not working on either end.

    cbarwin
    Participant
    2 years, 3 months ago in reply to: Range with Checkboxes Greater Than #28953

    It works if I manually change the URL. But if I change the range start to 1 and the range end and range gap to a really large number, it just doesn’t show the filter option. It only shows *-1

    cbarwin
    Participant

    Do you have any suggestions for how I might go about accessing the page? In theory, what would allow me to access it? More server resources? Do you think it’s timing out in AWS, or something with my server environment? Anything I could do to manually write the options into the database?

    Thanks for any direction you could give me.

    cbarwin
    Participant

    Hi,

    I am still not able to get it, can you be please more specific.

    Where do we need to do the changes? Is it WPSolr Pro => ‘Define your Search’ => 2.2 data screen? If yes then what fields?

    Thanks

    cbarwin
    Participant

    Thank you for your reply. What changes do we need to make in schema. Please suggest

    cbarwin
    Participant

    When we are using mehtod – add_remove_document_to_solr_index() what is causing it to trigger following Fatal error. Is there any specific setting or steps we are missing.

    PHP Fatal error: Uncaught Error: Class ‘GuzzleHttp\Ring\Exception\ConnectException’ not found in /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ezimuel/ringphp/src/Client/CurlFactory.php:126
    Stack trace:
    #0 /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ezimuel/ringphp/src/Client/CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Array, Array, Array)
    #1 /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ezimuel/ringphp/src/Client/CurlHandler.php(96): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Array, Array, Array, Array, Resource id #1500)
    #2 /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ezimuel/ringphp/src/Client/CurlHandler.php(68): GuzzleHttp\Ring\Client\CurlHandler->_invokeAsArray(Array)
    #3 /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/ezimuel/ringphp/src/Client/Middleware.php(30):” while reading response header from upstream, client: 12.227.37.194, server: s41tradeconnect.com, request: “GET /eclipse-price-inventory-db.php?kinsta-cache-cleared=true HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php7.4-fpm-s41tradeconnect.sock:”, host: “s41tradeconnect.com”

    cbarwin
    Participant

    We have custom meta fields to handle Inventory of a variant, and updating Inventory meta fiels using update_post_meta. We are sending posts for Indexing only if the inventory value is changed from what we already have in database.

    As per your suggestion, now we are using wp_update_post( get_post( $variantId ) ) for sending posts for Indexing instead of add_remove_document_to_solr_index() and a separate Cron job is Indexing posts. Do you think it will work efficiently. I am monitoring the process, it seems to be working now, means no Fatal error but triggering wp_update_post has increased the processing time to complete the process which leads to 504 Time-out. Any suggestions regarding alternative to wp_update_post when we are only updating a single meta field.

    Thanks

    cbarwin
    Participant

    We require 500 records per minute to make batch smaller so that it does not effect performance. It runs for some time and then start throwing Fatal error stated above, it keeps on throwing that error until it batch is reset to 200 records per minute. It should not throw fatal error, there has to be some exception handling which resume batch indexing when got buffer. I know there is no limit for number records sent in each batch but in our case it just got stuck with fatal errors. If there exception handling it may not index record but it will resume when got buffer on server limits. Or you can suggest any other method to send posts for indexing, we are currently using add_remove_document_to_solr_index().

Viewing 15 posts - 1 through 15 (of 42 total)