Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Super Search (sometimes) reverses meaning of Starting Date

by igelkott (Priest)
on Jun 12, 2008 at 23:19 UTC ( [id://691814]=monkdiscuss: print w/replies, xml ) Need Help??

Warning: In the category of way too picky.

Super Search drops the nf parameter when searching in the default "Newest first" order with a specified starting date. The effect is to make the specified date actually be the ending date (reversed logic).

Requesting "Oldest first" works as expected and retains the normal meaning of starting date. The parameter is apparently nf=0, a parameter which is missing for "Newest first". Adding nf=1 seems to give inconsistent results (for me) but at least sometimes the parameter is dropped to make the date an ending date again.

For example, searching for Q&A answers posted since June 1st and Oldest first results in two hits (as of 2008-06-13) with the following shortcut:

href://?node_id=3989;BIT=answer;nf=0;yr=2008;mo=06;dy=01;CA;MR

The same search with Newest first gives much more than 2 hits (presumably, everything but the latest two) and has this shortcut:

href://?node_id=3989;BIT=answer;yr=2008;mo=06;dy=01;CA;MR

Note that you'll need to add to the parameter list ;as_user= with your numerical ID (home node number) to get these searches to launch directly.

Of course, this isn't interesting with just two hits but is troublesome with more results.

Replies are listed 'Best First'.
Re: Super Search (sometimes) reverses meaning of Starting Date (English!)
by tye (Sage) on Jun 13, 2008 at 03:35 UTC

    It says "starting at" not "since" nor "oldest". In fact, if you pay attention to punctuation, capitalization, and even spacing, what it says is a sentence:

    Search ( Newest first -or- Oldest first ), starting at <date>.

    And the searching does indeed start at the date you specify and proceed in the direction that you specify.

    There is no date given for when the search should end in no small part because most searches won't finish in one submission anyway so you can just stop clicking "Next" when you have gone far enough. The amount of searching that will be done for a single submission is strictly restricted so that there isn't even much to be gained by cutting off a submission early based on date (even to the point that if the server is heavily loaded, the amount of searching done will be even less -- never more than about 10 seconds spent searching).

    There are also more obscure technical reasons why adding an ending date would be problematic. And even beyond those there are the UI problems which go beyond the fact that most people find Super Search to have way too much UI for their taste at any given moment so adding more to the UI is less likely to be a real improvement.

    - tye        

      While I disagree on the English definition of "starting at", I understand and (of course) accept your interpretation in this context.

      Thanks for the clarification that this was the intentional behavior and not in fact a bug. Not that it matters but I was mislead by the parameter nf=0 rather than simply nf -- certainly allowed but unexpected.

        It isn't a disagreement about the definition of "starting at". It is just that you assumed that the "start" being referred to was the start of the implied date range on the timeline of when the nodes to be searched were originally created. The "at" refers to dates on that timeline but the "start" in question is the start of the process of the search that is about to be done.

        Perhaps I will change it to "starting with" as, reflecting upon it, that seems to be a more common usage when the period being started and the measurement being discussed are from separate timelines. Or perhaps I should restate "searching" to make it clearer. But then, "Start searching with <date>" sounds wrong... or maybe it is most correct despite sounding a bit awkward...

        If you look up the history of Super Search, you can see that originally "oldest first" was not just the default order but the only supported order (due to a limitation in the MySQL optimizer). So nf=1 started out as how to override the order (but wasn't supported at first). Soon after nf=1 became supported, it also became the default. The radio buttons already sent either nf=1 or nf=0 so that was not changed. What was changed was what the absense of any "nf" parameter meant (which also changed the default state of those radio buttons on a freshly-loaded form).

        Further, Super Search tries hard to shorten the short-cut URL to the point of removing optional parameters. So "nf=1", being the default, gets removed. "nf=0" cannot be removed.

        As for "nf=1" giving "inconsistent results", you'd have to elaborate on that before I'd look into it further.

        - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://691814]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found