Showing posts with label sphinx. Show all posts
Showing posts with label sphinx. Show all posts

Tuesday, January 12, 2010

Sphinx and big integers

I encountered a problem that can give headaches even to the toughest programmers. I think that the solution will be quite a relief to some people.
The problem is when indexing in sphinx, the indexer sometimes prints out a warning/error message:

WARNING: DOCID_MAX document_id, skipping


which by the way is very annoying because it stops your indexing :)


I've searched the web for some solution, but I didn't find anything useful. When I experimented a little with the query I have discovered that the base id's are simply to big. The sphinx was built without the --enable-id64 option, what introduced only 32 integers and not micro timestamp id integers that have about 15 digits. 


Hope that this solution  helps some some of you to get to like sphinx ;-)

Friday, December 25, 2009

Sphinx, search and spamming

Ever tried searching for something on a fulltext search based website?

Each time You write a sentence in the "search" field, the web server most probably communicates with a search engine that priorly indexed some data in which you can search. Some of those sites are social media sites, some are sites in which being higher up the search ladder, can be of some benefit.

My experience is mostly with the sphinx search engine so i'll just go with that. When you search a phrase in sphinx, for example "php is the best", the engine tries to rank the results with the BM25 ranking function depending on the frequency of the words.

So if you have a confirmed sphinx based site, and it can be of some value to be found on some phrases, you can (but shouldn't) spam the hell of the site ;-)