ginatrapani/ThinkUp — pull request #1118 by cwarden (2011-11-08 16:33:13+00:00)
Title: Extract mentions while crawling

I'm not sure what the plans are for non-reply mentions. It looks like they're currently only accessible through the API. Using the mention tables exposed through the MentionDAO work @amygdala did to index mentions in posts when they are crawled looks like a better approach than the full-text search of all posts used by the API.

This change is a small step in this direction. It stores mentions using MentionDAO after fetching mentions from Twitter. Mentions found while fetching other posts (and mentions of other users found while fetching one user's mentions) are not currently stored.

733e04d0 is a fix to MentionDAO to prevent double-counting of mentions in the summary table if they are added multiple times. A unique index on `tu_mentions_posts` and use of `INSERT IGNORE` already prevents duplicates in the main table.