title: mysql: Mining for keywords and phrases
body: <p>I would like to get popular words and phrases (up to 3 words) from my products database table.</p>
  
  <p>I tried using sphinxsearch service for that which was great, except..</p>
  
  <ol>
  <li><p>The result it give are plain txt words - without slovenian special chars (čžš) that ARE in the products table</p></li>
  <li><p>the results are only single words, and no phrases</p></li>
  </ol>
  
  <p>sphinx builds this from an index... all together (including building the index) tooks about 2 minutes for 100,000 products...</p>
  
  <p>this is impressive.. since I need this only once in a while (1/month)...</p>
  
  <p>but as said before, unusable in my case....</p>
  
  <p>what are other alternatives?</p>
  
  <p>I need about 5,000 words and phrases</p>
  
  <h1>edit my products db source</h1>
  
  <pre><code>source products_src
  {
      type            = mysql
  
      sql_host        = localhost
      sql_user        = root
      sql_pass        = xxxxxxxxxx
      sql_db          = xxxxxxxxx
  
      sql_query_pre = SET CHARACTER_SET_RESULTS=utf8
      sql_query_pre = SET NAMES utf8
  
      sql_query       = \
          SELECT id, title, summary, keywords, text, category_id, company_id, created \
          FROM products WHERE status='A'
  
      sql_attr_uint = category_id
      sql_attr_uint = company_id
      sql_attr_timestamp = created
      sql_attr_string = title
      sql_attr_string = text
  
      sql_query_info      = SELECT id, category_id, title FROM products WHERE id=$id
  }
  </code></pre>