Forum Replies Created

Viewing 15 replies - 271 through 285 (of 297 total)
  • So far, so good! Thanks!

    Possibly related problems (disrupted formats, slow single-page loads) noted on other thread also seem to have been resolved, though generation of character-based excerpts remains impractical. “Words” setting seems quite adequate, however: You might consider making it the default setting, recommended for relatively larger databases. I would make some other recommendations on helping to guide new users to proper usage/indexing, but all are minor compared to the bottom line fact that Relevanssi so far seems to be working well again.

    Have noted the same problem (though with different document totals) under a still open thread – https://www.ads-software.com/support/topic/broken-format-on-search-results-custom-excerptsnippet – that began with other issues.
    It would be fine with me if the developer marked that other thread resolved and moved the discussion here – but it’s his plug-in, his threads.

    Thread Starter CK MacLeod

    (@ck-macleod)

    One last note – tried again with no comments – this time it shows 1138 docs/ca 190k terms on the first run through, and states “indexing complete.” In case it makes any difference in your assumptions, I did this indexing after de-activating and re-activating, and using the top “BUILD” button rather than the “SAVE AND CONTINUE.”

    Thread Starter CK MacLeod

    (@ck-macleod)

    (but single page loads are good…)

    Thread Starter CK MacLeod

    (@ck-macleod)

    First, I re-activated the plug-in, and the problem recurred.

    Next, I upgraded to 3.3.3, and things seemed OK.

    That was with comments NOT indexed. So, I set comments to normal, and attempted to re-build the index. Out of 2300+ documents, it indexed around 600 (takes a very long time). I then attempted to continue indexing, but, regardless of the setting (500 or 1000), it indexes only a small number of additional documents, and then stops at 672.

    I tried re-building again, and changed a couple of settings to have something to save, and out of curiosity. With COMMENTS set to “all” and Custom Fields to “none,” it indexes once to 600 documents, and then shows no changes when I click “CONTINUE INDEXING,” in reports “Indexing Complete!” It shows under 300,000 terms in the index compared to the ca. 745k found before (see comment above).

    So, one more time, I set Comments to “none,” and clicked “erase and re-build,” waiting for the routine to cycle… On first run-through, it gets to 933 docs/162k terms. And then adds no additional documents on repeated “Continue”‘s – “Indexing Complete.”

    Thread Starter CK MacLeod

    (@ck-macleod)

    I mean Single Post (single.php) posts. The main page and search results were loading OK – maybe a little slow, but hard to say for sure.

    Thread Starter CK MacLeod

    (@ck-macleod)

    Well, I was using one-word searches specifically to generate many results to check through.

    However, I have a new very serious problem that has forced me to disable Relevanssi on the larger site: Intolerably slow page loads. I first noticed last night, so I think it is new with recent changes to the plug-in. Checked again this morning: When I de-activate, the pages load normally. When I re-activate, they slow down.

    Don’t have time to investigate further right now. May start a new thread later, if no one else has done so first.

    Thread Starter CK MacLeod

    (@ck-macleod)

    So far mostly good to excellent news: The format disruptions have disappeared on the searches that were showing them previously. Will continue to monitor.

    The only downside is that the changes may have slowed down searches substantially, at some settings critically. When I have “Length of the Snippet” at “characters” instead of “words,” on my relatively larger site (2317 documents, 744574 terms indexed) I repeatedly get “Fatal error: Maximum execution time of 30 seconds exceeded in […]/wp-content/plugins/relevanssi/lib/common.php on line 682.” It is my impression that searches in general (or rendering of search results) may be somewhat slowed down. There is so far no problem, however, with the “characters” setting on my small site (53 documents, 4683 terms), where searches in general seem quite fast enough.

    For my purposes, this is a tremendous improvement, even if it’s not yet foolproof for your purposes. So, thanks and I’ll continue to watch developments (and recommend the plug-in!).

    Thread Starter CK MacLeod

    (@ck-macleod)

    Thanks for your reply.

    All of these results occurred with the only apparently relevant field on the options page – “Allowable tags in excerpts” – blank. It occurred to me that leaving that field blank might equate with “allow all tags,” since clearly the excerpts were allowing some tags, but I just tried it with the setting of <b> only, and then with <b><i>, as only allowable tags: The same search results formatting problem was re-produced.

    Do you have in mind some other method, through a brute force hack at some specific point in the code for instance, for suppressing tags in search results altogether?

    That’s too bad, as I think there is a lot of potential to this plug-in, and I was just going to offer to proofread it, and adjust some formatting in exchange for clear instructions for the particular implementation I have in mind: A daily compendium of my tweet traffic (own tweets, rts, and mentions), either done once at the end of the day and auto-posted, or updated intermittently as the day goes on within the body of a post. It looks to me like one or both could be done without too much hacking, but it’s not clear to me exactly how to do it, and I don’t have 100% confidence ahead of time that the trial and error will be worth it.

    Maybe someone else is working on something similar that I just haven’t run across yet, or some other application can be adapted to the purpose, or maybe, when I have enough time, I’ll look into unpacking/customizing/forking it. Thanks anyway for the work which at some time or another may provide the or a (properly credited) basis for an application that at least some bloggers active on twitter might very much like to have.

    note: The S2Member developers are themselves aware that using a serialized array for their custom user fields was a questionable decision, and they have periodically promised to re-do or look seriously into re-doing their own code. Initial research on searching serialized arrays in databases indicates widespread reluctance to deal with them at all. On the other hand, we know from the “unintended benefit” that the array is indeed somewhat readily searchable, at least on this relatively small scale. At least the S2M people figured it out.

    Anyway, I won’t take it amiss if you choose to bail out on this side-project if this turns out to be the problem, and you don’t see some other obvious mistake in my approach, but, if and when I manage to solve it, I’ll let you know.

    Review done! Sorry it took me so long to get around to it.

    Bad news, but I have not yet begun to fight, is that my first two tries at getting it to search the S2 meta_key “properly” failed.

    In addition to the S2protect functions, I tried to follow the FAQ “billing_city” example, but substituting S2M’s “wp_s2member_custom_fields” for “billing_city” in both the search-author.php and the meta_search functions (below).

    The other difference, and potential area for further research, first going back to S2M’s code as above, is that “wp_s2member_custom_fields” is a serialized array, meaning that the search term has to be found within the array’s content. I tried ‘IN’ instead of ‘=’ for the meta_compare value. So, the following does NOT work, either for reasons having to do with meta_key searches that I don’t understand, or because I made some error with the code that I missed. Could also be that I don’t properly understand “whitelisting” of variables.

    function kia_meta_search( $args ){
      // this $_GET is the name field of the custom input in search-author.php, using wp_s2member_custom_fields meta_key
        $search = ( isset($_GET['wp_s2member_custom_fields'])) ? sanitize_text_field($_GET['wp_s2member_custom_fields']) : false ;
        if ( $search ){
    		$args['meta_key'] = 'wp_s2member_custom_fields';
    		$args['meta_value'] = $search;
            //tried "in" since the meta_key contains a serialized array with a lot of info
    		$args['meta_compare'] = 'IN';
        }
        return $args;
    }
    add_filter('sul_user_query_args', 'kia_meta_search');
    
    //whitelisting the S2Member variable
    
    function kia_search_vars( $vars ){
        $vars[] = 'wp_s2member_custom_fields';
        return $vars;
    }
    add_filter('sul_user_allowed_search_vars', 'kia_search_vars');

    Works fine as far as restoring expected functionality – searching names only – without disturbing other S2Member functions. However, as also expected, it does interfere with the unexpected but desirable expanded functionality of searching S2Member usermeta fields.

    Just as a further note possibly for your own purposes, if I remove the added functions, but leave the change to simple-user-listing.php, there is no observable effect: Everything is as before. So, as far as I can tell, there’s no harm in moving the “do_action” to the new spot.

    This is a great start for me in terms of getting to the control I want – so big further thanks! I’m going to leave things as they were for now, except for the single change to simple-user-listing.php, but will next look into adding the S2Member meta_key (“wp_s2member_custom_fields”) to the query args directly via function. Will tackle it after lunch (I’m in California and we’re coming up on High Noon).

    I’ll also look at Sublime Text 3 later on. Usually I search multiple files with Notepad++, but, without your assistance/confirmation I wouldn’t have known for sure that what I was looking for was even there or directly relevant (thus the possible day long hair-pulling). I also wouldn’t have come up with a version of your S2M protection code anytime soon or without extensive trial and error.

    Very interesting, and thanks much. It probably would have taken me a day and several clumps of hair to get to that code.

    S2Member takes over a lot of “user list” functionality in admin. I guess that the way it’s written, including itself in, also affects our searches taking place outside of admin for other purposes.

    I’ll see if simply adding a condition (via a temporary hack) disables it in civilian areas while preserving it in admin, though, if that works, it would presumably also disable the expanded functionality that I like, and may interfere with other S2M functions. Even if it affects SUL searches only, I’m guessing a better solution will still require either re-producing pieces of the S2M code or filtering it.

    Somewhere at the bottom of this all might be a really nice implementation of a “not so simple user listing” for membership sites like the one I’m working on. The end goal would be ability to search a database of thousands of members in different ways and to tailor output, though other peculiarities of S2Member’s design might make that harder than it should be, and harder to transfer to non-S2Member set-ups.

    Thanks, again. By the way in addition to using SUL, I’m also using your Nav Menu Roles plug-in – very handy and well-designed!

    Thanks for your reply, and for confirming that the shortcode terms are supposed to carry over to the user search. I just started testing, and will report my findings.

    Setting up the plug-in at a different site brought up something that confused me months ago when I first started using this plug-in, which I’d set aside. I don’t mean to waste your time, but I think the problem may turn out to be connected, and might even lead to something useful for you and other users of your plug-in

    The SUL search is initially set up to “Search authors by name.” So, if we add SUL on a site with an author named “Miller,” and we search for “Miller,” we’ll bring up the author or authors named “Miller,” with links to all posts by however many Millers.

    To my understanding, this is how it’s supposed to work, and getting the search to search for anything else ought to require creating a custom search function, as in the “billing_city” example you use under your FAQs.

    Interestingly (and usefully!), for reasons unclear to me, and without my having done anything (intentionally), on the site where I first installed the plug-in, if I do a user search for “Miller,” it will bring up all of the authors who mention “Miller” in a custom field added via the membership plug-in S2Member and stored in the usermeta table.

    I’ll add that I was delighted with this to me unexpected functionality, as I thought it was something I was going to have to figure out how to add later on. I also expect that I will need to understand exactly why it’s happening in order to gain control over types of searches and outputs, since eventually I’d like to able to give users a wider range of options for narrowing searches and/or results.

    Here’s the page – it’s a site in “Beta,” but I hope for not much longer – where the initial list DOES employ the shortcode parameters, but a search DOES NOT. On the other hand, it DOES search the usermeta table and a specific field within it without my ever having specifically “asked” for that functionality – you can test using “Miller” or “Ashtanga,” for example:

    The YIR – Listings

    You’ll see that in my customization I added a note on searching the entirety of the user “profiles” at this site. I’ll just need to figure out how and why to get the further control I want, and to avoid bad surprises (i.e., the day that functionality just disappears).

    A suspicion is that there is some unexpected fraternization between your plug-in and S2Member that produces the custom field, but it’s just a suspicion at this point, and for various reasons somewhat laborious to test.

Viewing 15 replies - 271 through 285 (of 297 total)