WPSolr logo
Search
Close this search box.

Forum Replies Created

  • webmasterbslnl
    Participant

    It works with this fixed line 66:
    return new Client( new Curl(), new EventDispatcher(), $solarium_config );
    (so replace new Http() with new Curl()) and also replace at line 6 (or add if you want to be able to choose between the two later):
    use Solarium\Core\Client\Adapter\Curl;
    fyi: index performance seems the same if I compare the two options on another Solr server that does accept http 1.0.

    Thanks for your help!

    webmasterbslnl
    Participant
    11 months, 2 weeks ago in reply to: in section 2.2 I can’t overide labels for CPT’s #33256

    I found that $facet_items = apply_filters( WPSOLR_Events::WPSOLR_FILTER_FACET_ITEMS, [], $facet_name_standard, $selected_val ); returns the wrong labels. Input values for $facet_name_standard and $selected_val are ‘type’. Traced it to wpsolr-pro/wpsolr/pro/extensions/acf/class-wpsolr-plugin-acf.php:164 where the filter is added for ACF. $field = acf_get_field( $facet_name ); returns a custom field we indeed named ‘type’. It has nothing to do with CPT’s. We just defined an ACF field and named it ‘type’.

    So it seems that if you somewhere create an ACF field and name it ‘type’, you end up not being able to override labels for CPT’s in 2.4 Facets.

    I managed to work around the issue by manually exporting facet config, added the correct translations to the json and imported it all back. The manual additions actually work great in the frontend.

    webmasterbslnl
    Participant
    11 months, 2 weeks ago in reply to: in section 2.2 I can’t overide labels for CPT’s #33248

    in 2.2 Data I have (and had) selected all CPT’s I wanted indexed selected (https://snipboard.io/7y1kVt.jpg)
    in 2.4 Facets I selected ‘type’ among others. It does make the CPT’s show up in the facet widget correctly but with their original names. In the list of label overrides I see only the 3 mentioned labels but not my CPT’s. We have multiple WordPress sites, I normally am able to override labels for those, like this: https://snipboard.io/xIfh0t.jpg) But in this specific site the CPT’s do not show up and thus cannot be overridden.

    webmasterbslnl
    Participant
    1 year, 8 months ago in reply to: I want to pay my license but where? #30627

    Thank you very much for your swift reaction, got the invoice in the mail ;P

    webmasterbslnl
    Participant
    1 year, 8 months ago in reply to: I want to pay my license but where? #30625

    Hi Wpsolr,
    I did not get an invoice for my last payment, can you provide me one for our accountancy.
    Cheers

    webmasterbslnl
    Participant
    1 year, 9 months ago in reply to: I want to pay my license but where? #30458

    Yes I dit get the link, thank you.
    Cheers, Rob

    webmasterbslnl
    Participant

    Thanks, you were quick to answer! I will implement it on our site. This will not break any functionality of WPSolr itself? Will you be adding it to the next version of the plugin?

    webmasterbslnl
    Participant

    We use This in our config:

            <!-- Default Dutch analyser -->
            <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
               <analyzer type="index">
                   <tokenizer class="solr.StandardTokenizerFactory"/>
                   <filter class="solr.LowerCaseFilterFactory"/>
                   <filter class="solr.SnowballPorterFilterFactory" language="Kp"></filter>
                   <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_nl.txt" />
                   <filter class="solr.StemmerOverrideFilterFactory" dictionary="stemdict_nl.txt" ignoreCase="false"/>
                   <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true"/>
               </analyzer>
               <analyzer type="query">
                   <tokenizer class="solr.StandardTokenizerFactory"/>
                   <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
                   <filter class="solr.LowerCaseFilterFactory"/>
                   <filter class="solr.SnowballPorterFilterFactory" language="Kp"></filter>
                   <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_nl.txt" />
                   <filter class="solr.StemmerOverrideFilterFactory" dictionary="stemdict_nl.txt" ignoreCase="false"/>
                   <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true"/>
               </analyzer>
            </fieldType>

    “Kp” is a alternate Dutch language stemmer that seems to work better than the default Dutch one. But it is hard to tell without thorough testing: https://snowball.tartarus.org/algorithms/kraaij_pohlmann/stemmer.html
    More info on Dutch texts in SOLR I found here: https://dropsolid.io/knowledge-hub/solr-search-and-multilingual-content-drupal

    webmasterbslnl
    Participant

    Thank you, your suggestion on changing from the lightweight analyser to the standard one solved it!
    Kind regards, Harmen

    webmasterbslnl
    Participant

    Hi, Thanks for your suggestions.

    The first I tried but I can’t activate the Query monitor add-on because the plugin thinks it is unlicensed (It shows “Save Options / (Feature-limited version, click to activate)” instead of a save button.) Other addons work fine. Strange.
    I was able to log the query in a WordPress debug.log file. This is a snippet of what it said when searching with a trailing colon:

    Index: "/solr/acc-nursing-nl"
    Nb results shown: 1
    Total nb results: 1
    Speed: 497 ms 
    Query: {
        "options": {
            "handler": "select",
            "resultclass": "Solarium\\QueryType\\Select\\Result\\Result",
            "documentclass": "Solarium\\QueryType\\Select\\Result\\Document",
            "query": "(wetenschap\\:\\ eiwitrijke\\ operatie)",
            "start": 0,
            "rows": 10,
            "fields": "*,score",
            "omitheader": true,
            "querydefaultoperator": "AND"
        },

    And this is searching without the colon:

    Index: "/solr/acc-nursing-nl"
    Nb results shown: 1
    Total nb results: 1
    Speed: 497 ms 
    Query: {
        "options": {
            "handler": "select",
            "resultclass": "Solarium\\QueryType\\Select\\Result\\Result",
            "documentclass": "Solarium\\QueryType\\Select\\Result\\Document",
            "query": "(wetenschap\\:\\ eiwitrijke\\ operatie)",
            "start": 0,
            "rows": 10,
            "fields": "*,score",
            "omitheader": true,
            "querydefaultoperator": "AND"
        },

    I have not added the full debug log here. It does not list the calls being made to the SOLR backend but I got those from SOLR logs:

    2022-05-30 20:29:53.344 INFO (qtp1394940518-24) [ x:prd-nursing-nl] o.a.s.c.S.Request [prd-nursing-nl] webapp=/solr path=/select params={hl=true&fl=id,PID,type,meta_type_s,title,numcomments,comments,displaydate,displaymodified,*categories_str,author,*post_thumbnail_href_str,*post_href_str,snippet_s&q.op=AND&fq={!tag%3Dfct_excl_type}type:("post"+OR+"blog"+OR+"magazine"+OR+"magazine-article"+OR+"video")&fq=-post_status_s:("draft"+OR+"pending"+OR+"trash"+OR+"future"+OR+"private"+OR+"auto-draft")&fq=(*:*+-is_excluded_s:[*+TO+*])+OR+is_excluded_s:(n)&f.content.hl.simple.pre=<b>&defType=edismax&qf=content+title^2.5+categories^2+tags+introduction_str^2.5&hl.fl=title,content,comments&wt=json&f.content.hl.fragsize=400&facet.field={!key%3Dtheme_id_str}theme_id_str&facet.field={!key%3Dtags}tags&facet.field={!key%3Dtype}type&facet.field={!key%3Dcategories_str}categories_str&json.nl=flat&start=0&f.content.hl.simple.post=</b>&f.title.hl.fragsize=400&sort=date+desc&f.comments.hl.simple.pre=<b>&rows=10&f.title.hl.simple.pre=<b>&f.title.hl.simple.post=</b>&q=(wetenschap\:\+eiwitrijke\+operatie)&facet.limit=10&omitHeader=true&f.comments.hl.fragsize=400&f.comments.hl.simple.post=</b>&facet.mincount=1&facet=true} hits=1 status=0 QTime=1

    and
    2022-05-30 20:28:46.728 INFO (qtp1394940518-22) [ x:prd-nursing-nl] o.a.s.c.S.Request [prd-nursing-nl] webapp=/solr path=/select params={hl=true&fl=id,PID,type,meta_type_s,title,numcomments,comments,displaydate,displaymodified,*categories_str,author,*post_thumbnail_href_str,*post_href_str,snippet_s&q.op=AND&fq={!tag%3Dfct_excl_type}type:("post"+OR+"blog"+OR+"magazine"+OR+"magazine-article"+OR+"video")&fq=-post_status_s:("draft"+OR+"pending"+OR+"trash"+OR+"future"+OR+"private"+OR+"auto-draft")&fq=(*:*+-is_excluded_s:[*+TO+*])+OR+is_excluded_s:(n)&f.content.hl.simple.pre=<b>&defType=edismax&qf=content+title^2.5+categories^2+tags+introduction_str^2.5&hl.fl=title,content,comments&wt=json&f.content.hl.fragsize=400&facet.field={!key%3Dtheme_id_str}theme_id_str&facet.field={!key%3Dtags}tags&facet.field={!key%3Dtype}type&facet.field={!key%3Dcategories_str}categories_str&json.nl=flat&start=0&f.content.hl.simple.post=</b>&f.title.hl.fragsize=400&sort=date+desc&f.comments.hl.simple.pre=<b>&rows=10&f.title.hl.simple.pre=<b>&f.title.hl.simple.post=</b>&q=(wetenschap\+eiwitrijke\+operatie)&facet.limit=10&omitHeader=true&f.comments.hl.fragsize=400&f.comments.hl.simple.post=</b>&facet.mincount=1&facet=true} hits=0 status=0 QTime=0

    Do you still think removing trailing colons at indexing time is the solution?
    Thanks for your help,
    Harmen

    webmasterbslnl
    Participant
    2 years, 2 months ago in reply to: Indexing return error #29135

    Just found that modifying schema.xml and reloading the SOLR core is enough to make adding documents to the index work again. In schema.xml just change:
    <dynamicField name="*_i" type="integer" ...
    to
    <dynamicField name="*_i" type="long" ...
    and call https://yourserver:8983/solr/admin/cores?action=RELOAD&core=<your_index>&wt=json or the SOLR admin to reload the core. Querying on both existing and new documents worked fine after that.

    webmasterbslnl
    Participant
    3 years, 2 months ago in reply to: suggest multiple words #24813

    Thanks for pointing me in the right direction!

    webmasterbslnl
    Participant
    3 years, 6 months ago in reply to: pricing table of additional licenses #22251

    Well, we recently bought a single license configured it to our liking. We are satisfied with the result and depending on the price we want to install WPSolr on 7 to 10+ more websites. What will that cost?

    webmasterbslnl
    Participant

    I’m not sure what you mean by ‘only in the admin’. The query I mentioned affects the search performance not only when logged in as admin or when accessing tab 2.2 but also for anonymous front end users on every search performed.

    webmasterbslnl
    Participant
    3 years, 8 months ago in reply to: Pagination Not Working #21494

    I noticed the same problem using WPSOLR’s Ajax search template. Pagination button ‘1’ links to &page=0. PM me if you need a demo.

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