Support » Plugin: Search Regex » [Plugin: Search Regex] No limit option causes "no results" for valid searches

  • Su


    Using v1.4.13, with WP 3.4.
    In all cases(search, replace, replace/save), the “no limit” option breaks functionality completely, returning “no results” for searches that already do return results if a numerical limit is selected instead.

    Beyond that, the plugin seems to work perfectly fine.

    I had too many posts to modify for chunking through 100 at a time to be practical, so I temporarily hacked in an extra large value for the limit field in /search-regex/view/admin/search.php, line 23, in case this comes up for anyone else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Su


    This turns out to be more involved, related to particular field combinations. The content model of the project I’m using this on at the moment is very minimal so I can’t try everything, but to start:

    In all cases the search term is “the”
    Assuming anyone replicates this, your specific numbers may change, obviously, since this is dependent upon how many actual matches you have in your data. Just for reference, I’ve got about 2000 items at the moment.

    • Searching post titles with no limit always returns nothing.
    • Searching post titles with limit 10 returns 5 results.
    • Searching post titles with limit 25 returns 11 results.
    • Searching post titles with limit 50 returns 23 results.
    • Searching post titles with limit 100 returns 32 results.

    Note that each time we increase the limit(beyond 10), we get a number of results that should’ve been possible with the lower limit.

    • Searching post URLs with “no limit” also always returns nothing.
    • Post URL searches exhibit similar behavior to the numbered limits for titles.
    • Searching post content with any of the limit options(including none) returns 959 items
    • This is especially weird, so I tried a another term “will”, and the behavior is the same. (With different number of matches.)

    I don’t have much data in the post excerpts, but there’s a term I do know appears several times, so using it:

    • Searching post excerpts with no limit returns nothing
    • Using numerical limits, I still get nothing until set to 50(1 result) and 100(2 results), which obviously makes no sense.
    • Additionally, I know the term appears a lot more often than that, so there’s still instances that are being outright ignored.

    I have no comment or meta field data at the moment, so can’t try those.

    The behavior at least partially duplicates on a separate installation(though too small to draw much conclusions from), so hopefully I’m not completely wasting my time here documenting a case-specific glitch. Trying to find a larger install to try things out on for confirmation.

    Hi John,

    How’s things? Hope you’re well…

    Anyway, like Su, I’m also experiencing a problem with certain fields not working properly. I can confirm Su’s observation that Post Title and Post URLs with “no limit” will not work under any circumstances.

    Would be great if this could be fixed.


    PS: Su – thanks a lot for doing a very detailed test and analysis. Using the limit as 100, I was able to achieve what I needed to do for 61 pages and change the post titles and urls accordingly. 😀 Good job!

    …oh, forgot to mention: I’m using the latest version of the plugin (Version 1.4.13) and WordPress 3.4.

    Hope that helps. Let me know if you need any testing done.



    Update: just noticed that the plugin seems to work with regular expressions and Limits but not if the regex checkbox is unticked.

    Tested 2 different servers – DreamHost and ZenHosting. Both fail to produce results in non-regex searches. Weirdly, my local webserver (WAMP running PHP v5.3.0) seems to work with non-regex searches.

    Does that help at all?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Search Regex] No limit option causes "no results" for valid searches’ is closed to new replies.