# Delta index in Sphinx

**URL:** <https://www.ruby-forum.com/t/delta-index-in-sphinx/147580>\
**Category:** Rails\
**Created:** [September 3, 2008, 11:04am UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580 "2008-09-03T11:04:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anatoliy85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anatoliy85](https://www.ruby-forum.com/u/anatoliy85)\
**Post date:** [September 3, 2008, 11:04am UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580/1 "2008-09-03T11:04:39Z")

</div>

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 | removed\_email\_address@domain.invalid | | 6218 | removed\_email\_address@domain.invalid | | 6219 | removed\_email\_address@domain.invalid | | 6220 | removed\_email\_address@domain.invalid | | 6196 | removed\_email\_address@domain.invalid | | 4178 | removed\_email\_address@domain.invalid | | 4179 | removed\_email\_address@domain.invalid | | 4181 | removed\_email\_address@domain.invalid | | 5484 | removed\_email\_address@domain.invalid | | 5488 | removed\_email\_address@domain.invalid | | 5489 | removed\_email\_address@domain.invalid | | 4717 | removed\_email\_address@domain.invalid | | 4246 | removed\_email\_address@domain.invalid | | 4245 | removed\_email\_address@domain.invalid | | 3594 | removed\_email\_address@domain.invalid | ±-----±--------------------------------+ 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!

---

<div class="post-metadata">

**Author:** ![anatoliy85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anatoliy85](https://www.ruby-forum.com/u/anatoliy85)\
**Post date:** [September 3, 2008, 11:20am UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580/2 "2008-09-03T11:20:45Z")

</div>

## 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!

---

<div class="post-metadata">

**Author:** ![anatoliy85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anatoliy85](https://www.ruby-forum.com/u/anatoliy85)\
**Post date:** [September 3, 2008, 11:36am UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580/3 "2008-09-03T11:36:31Z")

</div>

\<-- ADD  
and in the table:

mysql\> select \* from sph\_counter;  
±-----------±-----------+  
| counter\_id | max\_doc\_id |  
±-----------±-----------+  
| 1 | 6220 |  
±-----------±-----------+  
1 row in set (0.00 sec)

---

<div class="post-metadata">

**Author:** ![anatoliy85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anatoliy85](https://www.ruby-forum.com/u/anatoliy85)\
**Post date:** [September 3, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580/4 "2008-09-03T12:27:37Z")

</div>

Frederick C. wrote:

> On 3 Sep 2008, at 11:04, Anatoliy Vv \<rails-mailing-list@andreas-  
> [s.net](http://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?

---

<div class="post-metadata">

**Author:** ![anatoliy85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@anatoliy85](https://www.ruby-forum.com/u/anatoliy85)\
**Post date:** [September 3, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/delta-index-in-sphinx/147580/5 "2008-09-03T12:03:50Z")

</div>

On 3 Sep 2008, at 11:04, Anatoliy Vv \<rails-mailing-list@andreas-  
[s.net](http://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?
