http://www.perlmonks.org?node_id=685828

In Re: Checking the value of an undefined value, I wrote that the (new in Perl 5.10) "//" operator would do what the OP wanted. Afterward, I thought I'd written something like that before, so I swung over to Super Search to find it. I entered "//" for the text and "kyle" in the author box and hit search.

This seems to find most (but not all) of my nodes.

I found what I was looking for by searching for "5.10" (because I always point out that // is a 5.10 feature when I mention it), but I'm wondering why the original search (for "//") didn't work.

As I was writing this, I think I figured it out. It's finding the "//" in "[doc://defined]", for example.

I wonder if it would be worthwhile to have a checkbox to search for nodes "as rendered" rather than "as entered". I might even suggest making that the default, but that might be surprising to someone used to the old behavior.

Replies are listed 'Best First'.
Re: Super Search sees '//' everywhere? (consntraints)
by tye (Sage) on May 10, 2008 at 08:29 UTC
    I wonder if it would be worthwhile to have a checkbox to search for nodes "as rendered" rather than "as entered". I might even suggest making that the default, but that might be surprising to someone used to the old behavior.

    That would require infrastructure to cache "as rendered" versions of nodes in the database so that they can be searched for. And you'd still probably very often find "//" as that is extremely common in HTML.

    Read some of the previous discussions of super search to better understand the rather tight and unusual constraints it has.

    - tye        

      Hmm. But how often does "://" come up in Perl code? Would it be possible to have Super Search exlude "://" results by default when someone searches for "//"?

        Not unless you come up with the SQL to do that (I'm pretty sure it isn't possible). Note that using regexes (RLIKE) is not an option due to their severe performance penalty (as noted in previous discussions).

        - tye        

Re: Super Search sees '//' everywhere?
by parv (Parson) on May 10, 2008 at 04:35 UTC

    Thought never occurred to me that a "super search" search would be searching for literal text unless asked.

    On a related note, the (super) search interface page is overly long with numerous options. (I am aware of the "what you do not use might be used by somebody else" part.) Only if there were a way to distort it per my own criteria (in any browser) ... hmmm ...

      Only if there were a way to distort it per my own criteria (in any browser) ... hmmm ...
      I think you can start from here: Free Nodelet Hack: Mini Super Search

      Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!