title: Personalized Search Results based on History
body: <p>What are some of the techniques for providing personalized search results to a logged in user? One way I can think of will be by analyzing the user's browsing history.</p>
  
  <p><strong>Tracking</strong>: A log of a user's activities like pages viewed and 'like' buttons clicked can be use to bias search results. </p>
  
  <p><em><strong>Question 1</em></strong>: How do you track a user's browsing history? A table with columns <code>user_id</code>, <code>number_of_hits</code>, <code>page id</code>? If I have 1000 daily visitors, each browsing 10 pages on average, wont there be a large number of records to <code>select</code> each time a personalized recommendation is required? The table will grow at 300K rows a month! It will take longer and longer to <code>select</code> the rows each time a search is made. <em>I guess the table for recording 'likes' will take the same table design</em>.</p>
  
  <p><em><strong>Question 2:</em></strong> How do you bias the results of a search? For example, if a user as been searching for apple products, how does the search engine <code>realise</code> that the user likes apple products and subsequently bias the search towards them? Tag the pages and accumulate a record of tags on the page visited?</p>