0
votes

Unfortunately, I think the error is not so that he has automatically updated the delta

I have this table addet in "database"

# in MySQL
CREATE TABLE sph_counter
(
counter_id INTEGER PRIMARY KEY NOT NULL,
max_doc_id INTEGER NOT NULL
);


source database
{
type            = mysql

sql_host        = localhost
sql_user        = root  
sql_pass        = root
sql_db          = database
sql_port        = 3306  # optional, default is 3306

sql_query       = \
    SELECT ID, name, dir, UNIX_TIMESTAMP(ctime) AS ctime, \
    FROM database

sql_field_string = dir
sql_field_string = name

}

source delta : database
{
sql_range_step  = 2
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, title, body FROM documents \
    WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
sql_query_pre = REPLACE INTO sph_counter_rls SELECT 1, MAX(ID) FROM `database`
}

index delta : database
{
source = database
path = /home/data/delta
}

index database 
{ 
source          = database 
path            = /home/data/database
docinfo         = extern 
#charset_type       = sbcs 
morphology          = none 
stopwords           = 
# minimum indexed word length 
# default is 1 (index everything) 
min_word_len        = 1 
charset_table       = 0..9, A..Z->a..z, a..z, -, U+0028, U+0029 
#enable_star        = 1 
min_prefix_len      = 0 
min_infix_len       = 2 
ngram_len       = 0 
}

edit: i have addet : index delta ...

indexer --all Sphinx 2.2.11-id64-release (95ae9a6) Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'... indexing index 'database'... collected 100 docs, 0.0 MB sorted 0.0 Mhits, 100.0% done total 100 docs, 8982 bytes total 0.078 sec, 114887 bytes/sec, 1279.08 docs/sec indexing index 'delta'... collected 100 docs, 0.0 MB sorted 0.0 Mhits, 100.0% done total 100 docs, 8982 bytes total 0.063 sec, 140585 bytes/sec, 1565.19 docs/sec total 212 reads, 0.000 sec, 0.3 kb/call avg, 0.0 msec/call avg total 24 writes, 0.000 sec, 6.3 kb/call avg, 0.0 msec/call avg

1
Hi. So what's the question? What are you 'indexer' commands and schedule? Do you have any crontasks for that?Manticore Search
I have with indexer --all the index created, and thought so far that with this config automatically updated. is a corntab necessary? when yes, how? I wand not complete new index makeMike Shiwa

1 Answers

0
votes

You 'delta' index can't be built at all since it doesn't defined in the config. Only 'delta' SOURCE is defined. And there's only INDEX - database which uses source 'database', not 'delta'