sphinx and WARNING: DOCID_MAX document_id, skipping

This error seems to wake-up with large ids >100.000.000 (like Ruby On Rails fixtures sys does).
Ok, like Piotr Jasiulewicz says this error appears because the sphinx was built without the –enable-id64 option.

Let’s go to solve this problem in Debian (note: I assume you use mysql, if not you have to change some dependencies packages).

Update 2012-05-31: this post refers to Debian Lenny i386. I don’t know if the binary package of Debian Squeeze (other distros, versions, architectures) is compiled with the same compile options at the moment. Anyway this post is intended to solve the specific warning (or to suggest a solution just in case you use another distro/architecture) .

Move to your preferred source folder (for example ~/src) or create it. Move to root user with su.
Download debian’s sphinxsearch sources:

#apt-get source sphinxsearch

Give permissions to your user on sphinxsearch files.

#chown -R youruser:youruser sphinxsearch*

Install mysql dev packages:

#apt-get install libmysqlclient-dev libmysqld-dev

Exit from root and return to your user. Enter in source folder of sphinxsearch (may vary with versions), configure with proper flags and make.

#exit
$cd sphinxsearch-0.9.9
$./configure –enable-id64
$make

Please note that pgsql is disabled by default and you should take a look at configure options (./configure –help) to see if you need others options, I don’t (except for libstemmer but I ignore this here).

Ok. If all was ok at make/compile time you can move on installation.

Move to root user with su (uninstall debian sphinx package if needed) and install.

#apt-get remove sphinxsearch
#make install

That’s all. Happy Sphinx On Ruby On Rails with fixtures 🙂

Tags: , , ,

About Autore

Amo internet e le opportunità che ci offre. Grazie anche a te, che fai parte di questo mondo fantastico.

3 responses to “sphinx and WARNING: DOCID_MAX document_id, skipping”

  1. dennis says :

    If anyone has troubles building sphinx, then there is a good chance for finding a good pre build package on http://sphinxsearch.com/downloads/

    • dennis says :

      forgot to mention that you have support for 64-bit unsigned integer (which indicates that later packages are build with –enable-id64). Tested this on the 2.0.4-release for a Ubuntu 11.04 box without any troubles.

      • Giulio Turetta says :

        Hi Dennis, this post refers to Debian Lenny i386. I don’t know if the binary package of Debian Squeeze (other distros, versions, architectures) has the same compile options. This post is intended to solve a specific warning. I’m going to specify it as soon as possible. Thank you for your contribute!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: