title: How do I get 64 bit ids to work with Sphinx search server 0.9.9 on Mac OS?
body: <p>I've been using Sphinx successfully for a while, but just ran into an issue that's got me confused... I back Sphinx with mysql queries and recently migrated my primary key strategy in a way that had the ids of the tables I'm indexing grow larger than 32 bits (in MYSQL they're bigint unsigned). Sphinx was getting index hits, but returning me nonsense ids (presumably 32 bits of the id returned by the queries or something)..</p>
  
  <p>I looked into it, and realized I hadn't passed the --enable-id64 flag to ./configure. No problem, completely rebuilt sphinx with that flag (I'm running 0.9.9 by the way). No change though! I'm still experiencing the exact same issue. My test scenario is pretty simple:</p>
  
  <p><strong>MySQL</strong>:</p>
  
  <pre><code>create table test_sphinx(id bigint unsigned primary key, text varchar(200));
  insert into test_sphinx values (10102374447, 'Girls Love Justin Beiber');
  insert into test_sphinx values (500, 'But Small Ids are working?');
  </code></pre>
  
  <p><strong>Sphinx conf:</strong></p>
  
  <pre><code>source new_proof
  {
  type                = mysql
  sql_host            = 127.0.0.1
  sql_user            = root
  sql_pass            = password
  sql_db              = testdb
  sql_port            = 
  sql_query_pre       =
  sql_query_post      =
  sql_query           = SELECT id, text FROM test_sphinx
  sql_query_info      = SELECT * FROM `test_sphinx` WHERE `id` = $id
  sql_attr_bigint     = id
  }
  
  index new_proof
  {
  source          = new_proof
  path            = /usr/local/sphinx/var/data/new_proof
  docinfo         = extern
  morphology      = none
  stopwords       =
  min_word_len    = 1
  charset_type    = utf-8
  enable_star     = 1
  min_prefix_len  = 0
  min_infix_len   = 2
  }
  </code></pre>
  
  <p><strong>Searching:</strong></p>
  
  <pre><code>→ search -i new_proof beiber
  Sphinx 0.9.9-release (r2117)
  ...
  index 'new_proof': query 'beiber ': returned 1 matches of 1 total in 0.000 sec
  
  displaying matches:
  1. document=1512439855, weight=1
  (document not found in db)
  
  words:
  1. 'beiber': 1 documents, 1 hits
  
  → search -i new_proof small
  Sphinx 0.9.9-release (r2117)
  ...
  index 'new_proof': query 'small ': returned 1 matches of 1 total in 0.000 sec
  
  displaying matches:
  1. document=500, weight=1
  id=500
  text=But Small Ids are working?
  
  words:
  1. 'small': 1 documents, 1 hits
  </code></pre>
  
  <p>Anyone have an idea about why this is broken?</p>
  
  <p>Thanks in advance
  -Phill</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ah. Okay, got further. I didn't mention that I've been doing all of this testing on Mac OS. It looks like that may be my problem. I just compiled in 64 bit on linux and it works great.. There's also a clue when I run the Sphinx command line commands that the compile didn't take:</p>
  
  <p><strong>My Mac (broken)</strong></p>
  
  <pre><code>Sphinx 0.9.9-release (r2117)
  </code></pre>
  
  <p><strong>Linux box (working)</strong></p>
  
  <pre><code>Sphinx 0.9.9-id64-release (r2117)
  </code></pre>
  
  <p>So I guess the new question is what's the trick to compiling for 64 bit keys on mac os?</p>