Delta index in Sphinx

Hello, all!

Help me please to solve problem with Sphinx and its delta index.

Configuration file is located in attachment to this topic.

mysql> select id, e_mail from users where e_mail LIKE ‘%test%’;

±-----±--------------------------------+
| id | e_mail |
±-----±--------------------------------+
| 3996 | [email protected] |
| 6218 | [email protected] |
| 6219 | [email protected] |
| 6220 | [email protected] |
| 6196 | [email protected] |
| 4178 | [email protected] |
| 4179 | [email protected] |
| 4181 | [email protected] |
| 5484 | [email protected] |
| 5488 | [email protected] |
| 5489 | [email protected] |
| 4717 | [email protected] |
| 4246 | [email protected] |
| 4245 | [email protected] |
| 3594 | [email protected] |
±-----±--------------------------------+
15 rows in set (0.03 sec)

indexer --all

Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/etc/sphinx.conf’…
indexing index ‘main’…
collected 5091 docs, 0.0 MB
total 5091 docs, 0 bytes
total 0.037 sec, 0.00 bytes/sec, 136141.19 docs/sec
indexing index ‘delta’…
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec

searchd
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/etc/sphinx.conf’…

@sphinx = Sphinx.new
=> #<Sphinx:0xb6f7fe20 @mode=0, @host=“localhost”, @groupby="",
@port=3312, @min_id=0, @warning="", @error="", @max={}, @weights=[],
@sortby="", @maxmatches=1000, @min={}, @filter={}, @sort=0, @limit=20,
@offset=0, @groupfunc=0, @max_id=4294967295>

@sphinx.set_match_mode(Sphinx::SPH_MATCH_ANY)
=> 1

@result = @sphinx.query(‘test’)
=> {:time=>“0.000”, :matches=>{}, :total=>0, :attrs=>{:e_mail=>3},
:words=>{“test”=>{:docs=>0, :hits=>0}}, :fields=>[], :total_found=>0}


but if i try in ./script/console find by email “test”, as you can see, i
get nothing.

Help me please to repair my mistake.

Thanks!

Sorry, i mistake in configuration file:

path = /var/sphinx/index/delta

but now i get a next error:

indexer --all

Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/etc/sphinx.conf’…
indexing index ‘main’…
collected 5091 docs, 0.0 MB
total 5091 docs, 0 bytes
total 0.036 sec, 0.00 bytes/sec, 141448.10 docs/sec
indexing index ‘delta’…
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.010 sec, 0.00 bytes/sec, 0.00 docs/sec

searchd

Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/etc/sphinx.conf’…
WARNING: index ‘main’: preload: failed to load
/var/sphinx/index/main.spa: bad size 0 (at least 8 bytes expected); NOT
SERVING

ps aux|grep searchd

root 3299 0.0 0.1 7208 868 pts/2 S 12:16 0:00 searchd

/var/sphinx/log/searchd.log:
[Wed Sep 3 12:16:43.119 2008] [ 3299] creating server socket on
0.0.0.0:3312
[Wed Sep 3 12:16:43.119 2008] [ 3299] accepting connections

sphinx = Sphinx.new
=> #<Sphinx:0xb6e95c30 @mode=0, @host=“localhost”, @groupby="",
@port=3312, @min_id=0, @warning="", @error="", @max={}, @weights=[],
@sortby="", @maxmatches=1000, @min={}, @filter={}, @sort=0, @limit=20,
@offset=0, @groupfunc=0, @max_id=4294967295>

sphinx.set_match_mode(Sphinx::SPH_MATCH_ANY)
=> 1

result = sphinx.query(‘test’)
=> {:time=>“0.000”, :matches=>{}, :total=>0, :attrs=>{:e_mail=>3},
:words=>{“test”=>{:docs=>0, :hits=>0}}, :fields=>[], :total_found=>0}


search -a test
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/etc/sphinx.conf’…
index ‘main’: search error: failed to load /var/sphinx/index/main.spa:
bad size 0 (at least 8 bytes expected).

Help me please to repair my mistake.

Thanks!

<-- ADD
and in the table:

mysql> select * from sph_counter;
±-----------±-----------+
| counter_id | max_doc_id |
±-----------±-----------+
| 1 | 6220 |
±-----------±-----------+
1 row in set (0.00 sec)

Frederick C. wrote:

On 3 Sep 2008, at 11:04, Anatoliy Vv <rails-mailing-list@andreas-
s.net> wrote:

Hello, all!

Help me please to solve problem with Sphinx and its delta index.

I don’t think this is a delta index issue. Have you checked whether
sphinx considers @ to be part of a word ie does it think that all your
email addresses are actually just one word long?

but how can i repair my mistake?

On 3 Sep 2008, at 11:04, Anatoliy Vv <rails-mailing-list@andreas-
s.net> wrote:

Hello, all!

Help me please to solve problem with Sphinx and its delta index.

I don’t think this is a delta index issue. Have you checked whether
sphinx considers @ to be part of a word ie does it think that all your
email addresses are actually just one word long?