Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

To quote from Super Search:

Match text containing [______________________________] (seperate strings with [__] -- default is spaces)
and then, quoting from Super Search results after each of your above search attempts:

where any text contains all of "IDE"

where any text contains all of "IDE"

where any text contains all of """, "IDE", """

So separating search terms on space (the default) gives us search terms for each of your attempts of ('IDE'), ('', 'IDE', and ''), and ('"', 'IDE', and '"'). But, of course, we ignore empty search terms. That explains the results above. The code that does this is even posted in public1. (:

So if you want to search on spaces, you have to make it so spaces don't seperate search terms. In the second field just enter any character (or string) that doesn't appear in your single search string.

There are no "special characters" when searching on strings. Backslashes, spaces, quotes, stars, parens, brackets, ampersands, etc. all just match what you type (case is ignored). You pick the separator you want. The default is space as people are used to listing several space-separated words. Searching for punctuation is important on a Perl site so the search doesn't tie up any characters as being "special" other than the delimiter string you choose.

As I've already said, some help pages need to be added.

I also hope to add support for some limited regular expressions. MySQL supports regular expressions and I had initially just assumed that they were rather minimal regular expressions that would be quick to run (this being a database server and all), but they are full-blown regular expressions from Henry Spencer. This means that entering a (perhaps intentionally) "bad" regular expression could burn a lot of SQL daemon CPU time (the strings being matched against are node contents which can be quite long leaving lots of room for pathological backtracking to get way out of hand).

So to support regular expressions I'm going to have to pick a subset of regular expression features (or perhaps some other wildcarding scheme such as what glob uses, ...) that I can translate to MySQL regular expressions so that I can be sure that no one can enter a "pattern" that locks up the site.

I don't know anything about Everything :) so don't know what it looks like in the query
But that is easy enough to find out. Simply "view source" on the results page and search for "SELECT" and there you'll see (one of) the query all spelled out in full SQL. :)

(Minor updates applied.)

        - tye (but my friends call me "Tye")

1 Leading and trailing spaces are stripped from the separator string (but not from the search string). And an empty separator string is interpretted as being a single space instead. This is because spaces don't really "show" on the web page.

So you can't set your separator to be, for example ", " nor " + ", but you can search on those strings so long as your separator string doesn't conflict.

In reply to (tye)Re4: Newest Super Search by tye
in thread Newest Super Search by tye

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (7)
    As of 2018-07-21 19:29 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (450 votes). Check out past polls.