Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

(tye)Re: New simple search

by tye (Sage)
on Jul 08, 2002 at 18:23 UTC ( #180259=note: print w/replies, xml ) Need Help??

in reply to Re: New simple search
in thread New simple search

That is completely intentional; it does "substring" matches, as I said. Note that it also matches "PerlIde4.2" when you search for "ide" and "compiling", "compiler", and "compiled" when you search for "compil". In my experience, in such a simple interface where you can only offer one or the other, the substring behavior is much preferable (especially when searching titles).

You'll have more control with the next "Super Search".

Update: I just experimented with a change where searching for ide searches for both "ide" and " ide " which means that a node title containing " ide " gets 2 points while one that only contains something like "side" only gets 1 point. Of course, that prevents the nodes containing "editor/ide" from showing up and I'm not about to go back to regular expressions for simple search nor try to determine what a good "word boundary" is and then document all of that complexity just for the simple search. But with the addition of a "search more" option in Search results, this modification might be used.

And it gives me some ideas for "Super Search". Thanks!

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

Replies are listed 'Best First'.
Re2: New simple search
by blakem (Monsignor) on Jul 09, 2002 at 05:32 UTC
    I like the points system.... Though I might tweak the definition of a full-word. How about "a substring bounded by non-letters (or the ends of the string)". Something like (^|[^A-Za-z])ide([^A-Za-z]|$) That approach has worked well for me in my search engine attempt. Especially considering titles like 'Using CGI::Cookie with HTML::Template'


      Like I said, I don't want to go back to using a regex for simple search and your definition only makes sense for words of letters. And, like I said, I don't really want to get this complicated and figure out and document which cases should have which kind of word boundary rules (consider "don't", "qq'", "'hi'", "0x", "%s", etc.)

      Like I said, Super Search will allow more control over boundaries to use with your search terms.

              - tye (but my friends call me "Tye")
        Ah, I see. I thought you were vowing not to accept regular expressions in the user input. Anyway, I like the non-letter boundaries, but sticking with whitespace is almost as good and probably quite a bit quicker.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://180259]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-10-30 14:29 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (280 votes). Check out past polls.