Delta index in Ultrasphinx

Hello, all

I have a problem with delta index in Ultrasphinx.

My configuration:


app/models/user.rb:

class User < ActiveRecord::Base
belongs_to :user_profile

is_indexed :fields => [‘created_at’, ‘e_mail’],
:delta => true
end

mysql> show columns from users;
±--------------------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±--------------------------±-------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| e_mail | varchar(64) | YES | MUL | NULL | |
| created_at | datetime | YES | | NULL | |
±--------------------------±-------------±-----±----±--------±---------------+
rake ultrasphinx:configure

(in /home/tolya/test_sphinx)
Rebuilding configurations for development environment
Available models are User
Generating SQL

rake ultrasphinx:index

(in /home/tolya/test_sphinx)
$ indexer --config
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’ --all
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’…
indexing index ‘main’…
collected 5093 docs, 0.1 MB
sorted 0.0 Mhits, 100.0% done
total 5093 docs, 127491 bytes
total 0.077 sec, 1652958.05 bytes/sec, 66032.23 docs/sec
indexing index ‘delta’…
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.011 sec, 0.00 bytes/sec, 0.00 docs/sec

rake ultrasphinx:daemon:start
(in /home/tolya/test_sphinx)
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’…
Started successfully

mysql> select id, e_mail, created_at from users where e_mail LIKE
‘%romanzdswetest%’;
±-----±-------------------------±--------------------+
| id | e_mail | created_at |
±-----±-------------------------±--------------------+
| 3996 | [email protected] | 2007-10-22 18:34:31 |
±-----±-------------------------±--------------------+

In console:

@s = Ultrasphinx::Search.new(:query => ‘romanzdswetest’).run
@s.results
=> [#<User id: 3996,…
Ultrasphinx is find “romanzdswetest”.


Now insert a data to table users:

mysql> insert into users (e_mail, created_at) values
(“[email protected]”, NOW());

mysql> select id, e_mail, created_at from users where e_mail LIKE
[email protected]%’;
±-----±------------------±--------------------+
| id | e_mail | created_at |
±-----±------------------±--------------------+
| 6223 | [email protected] | 2008-09-02 17:08:39 |
±-----±------------------±--------------------+
1 row in set (0.00 sec)

rake ultrasphinx:index:delta

(in /home/tolya/test_sphinx)
$ indexer --config
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’ --rotate
delta
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’…
indexing index ‘delta’…
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.023 sec, 0.00 bytes/sec, 0.00 docs/sec
rotating indices: succesfully sent SIGHUP to searchd (pid=3224).
Index rotated ok

but in console:

./script/console

Loading development environment (Rails 2.1.0)

@s = Ultrasphinx::Search.new(:query => ‘zzzxxxccc’).run
@s.results
=> []


Where is i make mistake? Why Ultrasphinx doesn’t find “zzzxxxccc”?

In the attachment is locate my development.conf.

Help me please to solve my problem.

Thanks

On 2 Sep 2008, at 15:24, Anatoliy Vv wrote:

using config file
‘/home/tolya/test_sphinx/config/ultrasphinx/development.conf’…
indexing index ‘delta’…
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.023 sec, 0.00 bytes/sec, 0.00 docs/sec
rotating indices: succesfully sent SIGHUP to searchd (pid=3224).
Index rotated ok

You can tell thinks have gone wrong at this stage: the index should
have picked up at least 1 document


Where is i make mistake? Why Ultrasphinx doesn’t find “zzzxxxccc”?

In the attachment is locate my development.conf.

Sphinx is using the updated_at column to decide which rows should be
in the delta index. However you haven’t set updated_at

Fred

thank you very much!