SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Forum searches by OR instead of AND

    Whenever I do a search in the Sitepoint forums I get a zillion answers, most of them not relevant. It appears that the search is an OR search on every word, like show records with keywords "PHPMYADMIN" OR "error" or "#1396", when I really want a search that finds posts with all three of those words.

    Is there any way to force an AND search?

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    5,321
    Mentioned
    213 Post(s)
    Tagged
    5 Thread(s)
    Quoting the phrase seems to work, up to a point. "phpmyadmin error #1396" gives me
    The following words are either very common, too long, or too short and were not included in your search:
    "phpmyadmin error #1396"
    Not altogether helpful. "error #1396" returned no results, and "phpmyadmin error" returned a long list, which at a quick glance did seem to refer to phpmyadmin errors, so it's a start.

    I tried it using a two-word phrase from a post I just made. Unquoted, I get 18 pages of results; quoted, I just get my recent post. Pretty good, I thought.
    Don't be arrogant. Be kind to a koala that thinks it's a bear.

  3. #3
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got that same error about very common, too long, or too short. It would help if they explained what is too long. It wasn't bad characters, since the other two searches worked for you.

    I tried quoting some searches but was less successful.

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,400
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    From the advanced search page:
    Forum searches by OR instead of AND
    and there is no way of changing that as far as I can see.
    @HAWK ; can you tell us why searches can't be done by AND ?

  5. #5
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Because you're more likely to hit relevancy on OR instead of AND; even if you have to wade through irrelevancy.

    Use your example.
    "phpmyadmin error #1396"

    Searching with AND for those three terms would miss threads like "phpmyadmin error lists" (doesnt contain #1396), "phpmyadmin error 1396" (missing the #).... etc....etc...
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  6. #6
    Galactic Overlord gold trophysilver trophybronze trophy
    HAWK's Avatar
    Join Date
    Aug 2003
    Location
    New Zealand
    Posts
    12,313
    Mentioned
    879 Post(s)
    Tagged
    13 Thread(s)
    Quote Originally Posted by guido2004 View Post
    @HAWK ; can you tell us why searches can't be done by AND ?
    Not specifically, no, although what Starlion says makes sense...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •