On 10/20/06, Jeff Gortatowsky <[EMAIL PROTECTED]> wrote:
> Jens Kraemer wrote:
>
> > To keep the index creation from happening when the index is accessed the
> > first time from your app (could be a search, or some update/create
> > operation), you can build up the index from the console, i.e.
> >
> > RAILS_ENV=production script/console
> >>> Model.rebuild_index
> >
> > cheers,
> > Jens
>
>
> Thank you Jens. While all you say is true, the original rowset was over
> 8.000.000 rows and would have taken days or more. I just wanted to do
> some experimentation to see if my code would work. AaF is not that well
> documented (well perhaps for those smarter than I) and therefore I
> thought my best best was to play with it in the console. Little did I
> realize it would go off and index the table to start.
>
> And while you are correct that most of the time, you want an index,
> really there are use cases where you only want to index data from that
> time forward.

That may be true but I don't think the goal of acts_as_ferret should
be to cover all possibly use cases. It's job is to make using Ferret
with ActiveRecord as easy as possible. If you need to do anything more
complicated than usual then why not just use Ferret directly?

> Anyway I created a much smaller table and worked with it
> to start. However it created 28.000 files for 25.000 records. Still not
> quite right. But it does work in that I can search it.

There is something very wrong there but I have no idea what the
problem. For some reason Ferret doesn't seem to be merging the index
segments (judging by your following email).

> BTW: Is there a method to say only return fields from the documents that
> matched and not all the fields of documents that had matches? Of course
> I did my own filter.

Ferret documents are lazy loading so only the fields that you view get
loaded. However, there is currently no way to find out which fields
matched.

Cheers,
Dave
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to