Sphinx doesn't know to count

Issue #721 resolved
Jose M. Albarran created an issue

Version:

$ piler -v 1.2.0-master build 948

$ mysql -V mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64) using EditLine wrapper

$ lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial

Issue

I have just reseted the installation, resetting indexes with indexer -a, and executed a massive pilerimport process from maildir directory format (readpst extracted)

The pilerimport report 4300 mails processed, with 13 duplicated

The GUI admin homepage reports 4290 messages, with 13 duplicated (bad, I have lost 10)

But auditor Sphinx search reports 6978 messages (joining all folders)

NOTE: For resetting I mean:

  1. Stop searchd and piler:

sudo service cron stop

sudo /etc/init.d/rc.searchd stop

sudo /etc/init.d/rc.piler stop

  1. Remove stored emails:

sudo rm -rf /var/piler/store/00/*

  1. Drop and recreate the piler database:

mysql> drop database piler;

mysql> create database piler character set utf8mb4 collate utf8mb4_spanish_ci;

mysql -u piler -p piler < ./util/db-mysql.sql

  1. Reset the sphinx index data

sudo rm -rf /var/piler/sphinx/*

sudo su - piler

indexer --all

  1. Start searchd and piler:

sudo /etc/init.d/rc.searchd start

sudo /etc/init.d/rc.piler start

sudo service cron start

NOTE2 Bitbucket editor is a pure bullshit!

I have to enter twice to get a single carriage return / linefeed in preview!!!

Comments (4)

  1. Janos SUTO repo owner

    How many messages do you have in the metadata table?

    select count(*) from metadata;
    

    As I said in the previous issue, skip the folder feature, and try again, and show the new results.

  2. Janos SUTO repo owner

    I've found the issue. Sphinx adds the delta1 index counts as well. Try the following: edit config.php, and fix the following settings:

    $config['SPHINX_MAIN_INDEX'] = 'main1,dailydelta1,delta1';
    

    to like this, and check the numbers again

    $config['SPHINX_MAIN_INDEX'] = 'main1,dailydelta1';
    
  3. Log in to comment