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 (c) 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 (c) 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 | romanzdswetest-/E1597aS9LQAvxtiuMwx3w@public.gmane.org | 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
("zzzxxxccc-JGs/UdohzUI@public.gmane.org", NOW());
------------------------------------------------------
mysql> select id, e_mail, created_at from users where e_mail LIKE
''%zzzxxxccc-JGs/UdohzUI@public.gmane.org%'';
+------+-------------------+---------------------+
| id | e_mail | created_at |
+------+-------------------+---------------------+
| 6223 | zzzxxxccc-JGs/UdohzUI@public.gmane.org | 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 (c) 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
Attachments:
http://www.ruby-forum.com/attachment/2637/development.conf
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---