Search code examples
sphinx

How to debug sphinx search using the indextool


I ran indextool on an index that crashes sphinx when I use indexer on it.

The output of indextool shows many failures such as:

FAILED, string offset out of bounds (row=18, stringattr=3, docid=3317, index=896070)

Can someone help me understand what the parameters (row, stringattr, docid, index) relate to so I can inspect the index csv file to try and see what's causing the failure?


Solution

  • Those are offsets within the generated index. Not in the original source dataset.

    But also as far as I know indextool is only inspecting existing indexes. Running indexer is trying to create a new version of the index from the 'source' data. So if indexer is 'crashing' a proper index is NOT being built.

    So indextool is inspecting some previous version, rather than the partly built index when indexer crashed! THat early version was already corrupted.

    In short using indextool is a non starter. Need to debug using indexer instead.

    Maybe try --dump-rows and/or --verbose options to indexer maybe will reveal something useful just before the crash happens?