Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

Author Topic: [SOLVED] apt-xapian-index crash  (Read 481 times)

Offline munair

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
[SOLVED] apt-xapian-index crash
« on: January 17, 2021, 11:23:41 am »
While this is actually a Debian bug, I found this the best place on the forum to mention it.

With every Debian based system I install/use Synaptic and add the quick search box by installing and updating apt-xapian-index from the terminal:

Code: [Select]
$ sudo apt install apt-xapian-index
$ sudo update-apt-xapian-index -vf

However, xapian-index will not update (index) and ends with the message 'IndexError: list index out of range'. It does this every time. I checked the Debian bug list and it appears this bug was reported on 23 August 2019. Apparently it still exists.

I solved the problem by changing line 114 in (/usr/share/apt-xapian-index/plugins/

old line:
Code: [Select]
doc.add_term(pfx + name.split(None, 1)[0])
new line:
Code: [Select]
doc.add_term(pfx + name.split(' ', 1)[0])
This bug affects at least SparkyLinux 5.13. It may take a while before Debian will solve this bug (if at all) so I present this solution here because I'm a SparkyLinux user and the community may benefit from it. It is not a great issue, but it is nasty for those like me who want the quick search box in Synaptic (which I believe should be in there by default. Just MHO.
« Last Edit: January 18, 2021, 03:44:39 pm by munair »