Forum Replies Created

  • ekimunal
    Participant

    Our index was created by WPSOLR, now I am reindexing just to be sure, will let you know how things go. Can you please remove posts that have links to avoid indexing for staging env.

    • This reply was modified 7 years ago by wpsolr.
    ekimunal
    Participant

    Both env use the same schema.xml and same solrconfig.xml

    ekimunal
    Participant

    Here is the query date based:
    SELECT xxx_10_posts.ID FROM xxx_10_posts WHERE 1=1 AND xxx_10_posts.ID IN (2100243,2100241,2100232,2100222,2100223,2100226,2100227,2100205,2100206,2100197) AND xxx_10_posts.post_type IN (‘post’, ‘rdm_video’, ‘attachment’) AND ((xxx_10_posts.post_status <> ‘trash’ AND xxx_10_posts.post_status <> ‘auto-draft’)) ORDER BY FIELD( xxx_10_posts.ID, 2100243,2100241,2100232,2100222,2100223,2100226,2100227,2100205,2100206,2100197 ) LIMIT 0, 10

    Here is the query relevancy based:
    SELECT xxx_10_posts.ID FROM xxx_10_posts WHERE 1=1 AND xxx_10_posts.ID IN (1507043,208918,280958,281497,278558,282711,282723,276404,301299,308041) AND xxx_10_posts.post_type IN (‘post’, ‘rdm_video’, ‘attachment’) AND ((xxx_10_posts.post_status <> ‘trash’ AND xxx_10_posts.post_status <> ‘auto-draft’)) ORDER BY FIELD( xxx_10_posts.ID, 1507043,208918,280958,281497,278558,282711,282723,276404,301299,308041 ) LIMIT 0, 10

    ekimunal
    Participant

    Both staging(same codebase with my local) and production uses the same schema btw

    ekimunal
    Participant

    When we launched this project team spoke with Solr and WebSolr customized our schema(WPSOLR) to work with WebSolr, so on the production env it is working quite well.

    I believe all the issue lies in the wp_query that is generated after sorting is defined.

    I will try to investigate but couldn’t produce any logs or errors.

    ekimunal
    Participant

    Here is the link to production env: (hidden)

    ekimunal
    Participant

    Does this apply to version 20 too? as it is working just fine in the production environment, same site; same plugin? Previous developer was able to get this working and it is working on even production.

    ekimunal
    Participant

    We are using websolr with wpsolr config

    ekimunal
    Participant

    I have all files supposedly configured and working on the production version, staging and my local server fails, they use the same details and configuration:

    schema.xml
    elevate.xml
    stopwords.txt
    synonyms.txt
    solrconfig.xml

    ekimunal
    Participant

    <!– Date fields used for sorting and searching –>
    <field name=”date” type=”date” indexed=”true” stored=”false”/>
    <field name=”modified” type=”date” indexed=”true” stored=”false”/>

    <!– Fields used to display the date –>
    <field name=”displaydate” type=”string” indexed=”false” stored=”true”/>
    <field name=”displaymodified” type=”string” indexed=”false” stored=”true”/>

    ekimunal
    Participant

    If you select sorting from the filters as relevancy, everything is working as it should, I wonder why it does not work when I select by date

    ekimunal
    Participant

    Removing custom code did not fix the issue, tried default with same results. Any idea what might be the issue?

    ekimunal
    Participant

    Yeah sorry, nothing related to Solr in the debug.log or apache logs.

    try {
    if ( ” === get_search_query() ) {
    throw new Exception( ‘No query specified.’ );
    }
    $localization_options = OptionLocalization::get_options();
    $final_result = WPSOLR_Service_Container::get_solr_client()->display_results( WPSOLR_Service_Container::get_query() );

    $sorts = WPSOLR_Data_Sort::get_data(
    WPSOLR_Service_Container::getOption()->get_sortby_items_as_array(),
    WPSOLR_Service_Container::getOption()->get_sortby_items_labels(),
    WPSOLR_Service_Container::get_query()->get_wpsolr_sort(),
    $localization_options
    );
    $query = WPSOLR_Service_Container::get_query();
    $query->get_posts();

    } catch ( Exception $e ) {
    $sorts = array();
    $facets = array();

    // On failure, we revert to an empty WP_Query which would have no results.
    $query = new WP_Query();
    }

    Here is the custom modifications we use with WPSOLR

    ekimunal
    Participant

    Enabled debug but cant get any logs in apache log again, redirect issue seems resolved yet it is still not loading unless relevancy filter is selected.

    ekimunal
    Participant

    Will check this limit now

Viewing 15 posts - 16 through 30 (of 34 total)