WordPress.org

Ready to get started?Download WordPress

Forums

Search Regex
No limit option causes "no results" for valid searches (5 posts)

  1. Su
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/search-regex/

  2. Su
    Member
    Posted 1 year ago #

    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.

  3. ZainB
    Member
    Posted 1 year ago #

    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.

    Cheers,

    Zain
    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. :D Good job!

  4. ZainB
    Member
    Posted 1 year ago #

    ...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.

    Cheers,

    Zain

  5. ZainB
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.