Forum: Ruby on Rails Rails and Sphinx

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
093225dffec90d73f5f5685f2db81da0?d=identicon&s=25 Mix Mix (mix)
on 2009-04-16 00:59
(Received via mailing list)
Hi, i'm currently using ferret+acts_as_ferret for doing some searches
in the db (not so big for now, just 40k~ records, but they will be
near 2M+ soon). For now ferret it's working quite well, but sometimes
i've indexes corrupted (i use it's drb server in production) and i've
to rebuild all the indexes, so i've bad indexes, angry users and time
spent to make it right.
I'm looking at sphinx and it seems the answers to this problems, as it
seems that it doesn't have this such of problems. But i've seen that
i've to remake indexes everytime (/hour or less).. does it take a lot
to rebuild them?
Is there anyone who use shpinx in production?
Another big question about it is if it's possible to create custom
indexes without having the records in the db, for example with ferret
it's just a :fields => {:my_custom_field => {}} and then a method
named my_custom_field which set what i need (for example a list of
strings/integers, that i need to index, like category ids "4 8 15 16
23 42", and then doing a query searching with for example 15, or stuff
like that (actually i've 8 fields, but soon they will be around 12-15)
Is it possible something like this with sphinx?
For ferret there is acts_as_ferret, for sphinx what do you suggest ?
acts_as_sphinx or is there something else?
thank you
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2009-04-16 01:03
(Received via mailing list)
On Apr 15, 2009, at 3:59 PM, fausto wrote:

> to rebuild them?
Look into the 'delta' options.  That way you have a main index and a
delta index of recent changes.  Quicker to update and then nightly you
can rebuild the whole thing.

> Is there anyone who use shpinx in production?

I have in the past yes, using the thinking sphinx plugin.

Worked great.
9b4c04c050122bcea16a6f3376d680fa?d=identicon&s=25 Daniel Bush (danb)
on 2009-04-16 05:26
(Received via mailing list)
2009/4/16 fausto <fausto.galli@email.it>

> to rebuild them?
> Is there anyone who use shpinx in production?
> Another big question about it is if it's possible to create custom
> indexes without having the records in the db,


You can send an xml "docset" document to sphinx to build the index; use
the
xmlpipe2 source type in your conf and have a script that will generate
the
xml to STDOUT.
The docset contains a set of documents with id's (which you might map to
the
id in a table in your database if you were using it). Each document
contains
a set of field tags with the information you want to index.
I don't know how that squares with large datasets - my app was very
small.
I use the Riddle client that comes with Thinking Sphinx to talk to
searchd.

Some of this stuff is documented on the sphinx website somewhere, though
piecing it altogether took some effort.

--
Daniel Bush

http://blog.web17.com.au
093225dffec90d73f5f5685f2db81da0?d=identicon&s=25 Mix Mix (mix)
on 2009-04-17 14:13
(Received via mailing list)
> You can send an xml "docset" document to sphinx to build the index; use the
> xmlpipe2 source type in your conf and have a script that will generate the
> xml to STDOUT.
> The docset contains a set of documents with id's (which you might map to the
> id in a table in your database if you were using it). Each document contains
> a set of field tags with the information you want to index.
> I don't know how that squares with large datasets - my app was very small.
> I use the Riddle client that comes with Thinking Sphinx to talk to searchd.

I'm worried that it would takes quite a long with a lot of records
(>2M) :(

@Philip:
I've seen about delta indexes, and I'll go with them :) From what I've
read sphinx is also a lot faster than ferret to rebuild all the
indexes :)
This topic is locked and can not be replied to.