Women in Technology

Hear us Roar



Article:
  Building a Simple Search Engine with PHP
Subject:   RE: A more detailed query...
Date:   2003-12-23 07:44:06
From:   anonymous2
Response to: RE: A more detailed query...

I tried that earlier, but it doesn't seem to work - the reason being (I think) that there ARE occurances of that word that are defined as not being in that article (aka, all the occurances in other articles).
Full Threads Newest First

Showing messages 1 through 1 of 1.

  • RE: A more detailed query...
    2003-12-23 08:12:37  anonymous2 [View]

    Let me try to explain a little more clearly.

    Say I have an article with the word "science" and the word "computer" in it, and the search asked for all articles with "science" but without "computer."

    If I use this query:

    w2.word_word != "computer"

    than it will look for an occurance o2 that dosn't point to "computer". However, this constraint would be satisfied instantly by any other word existing in the article - even the word "science" would satisfy it. As long as there is one instance of a word other than computer in that article, the search will bring it up.

    If I put the "!= " further up with the article definition, we still get a similar problem:

    p.page_id != o1.page_id

    This occurrence o1 of "computer" may indeed not be in the page, simply because it is an occurrence of "computer" on another page. As long as there is any other page with "computer" on it, the query will bring up the page that the search dosn't work.

    What I really want is not:

    "Find a page where there EXISTS a word "computer" not on that page"

    but:

    "Find a page that, for ALL occurrences of the word "computer", NONE of them are on it"