Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do search engines conduct 'AND' operation?
    primarykey
    data
    text
    <p>Consider the following search results: </p> <ul> <li><a href="http://www.google.com/search?hl=en&amp;source=hp&amp;q=David&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=" rel="nofollow noreferrer">Google for 'David'</a> - <strong>591 millions</strong> hits in 0.28 sec</li> <li><a href="http://www.google.com/search?hl=en&amp;q=John&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=" rel="nofollow noreferrer">Google for 'John'</a> - <strong>785 millions</strong> hits in 0.18 sec</li> </ul> <p>OK. Pages are indexed, it only needs to look up the count and the first few items in the index table, so speed is understandable. </p> <p><em>Now consider the following search with AND operation</em>:</p> <ul> <li><a href="http://www.google.com/search?hl=en&amp;source=hp&amp;q=David+John&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=" rel="nofollow noreferrer">Google for 'David John'</a> ('David' AND 'John') - 173 millions hits <strong>in 0.25 sec</strong></li> </ul> <p>This makes me ticked ;) How on earth can search engines get the result of AND operations on gigantic datasets so fast? I see the following two ways to conduct the task and both are terrible:</p> <ol> <li>You conduct the search of 'David'. Take the gigantic temp table and conduct a search of 'John' on it. HOWEVER, the temp table is not indexed by 'John', so brute force search is needed. That just won't compute within 0.25 sec no matter what HW you have. </li> <li>Indexing by all possible word combinations like 'David John'. Then we face a combinatorial explosion on the number of keys and not even Google has the storage capacity to handle that.</li> </ol> <p>And you can AND together <a href="http://www.google.com/search?hl=en&amp;source=hp&amp;q=David+John+Bob+Rob+Steve+Bill+Charles+Larry&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=" rel="nofollow noreferrer">as many search phrases as you want</a> and you still get answers under a 0.5 sec! How?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload