On 6/21/06, ryan king <[EMAIL PROTECTED]> wrote:
> Sergei Serdyuk wrote:
> > Hi,
> >
> > From looking at Ruby sources it seems that every update method deletes
> > and reinserts documents. It makes sense if indexed fields are changed
> > but what if it is not the case? It would speed up update a lot indexes
> > did not have to be updated twice for nothing. Any quick way to do it?
>
> I'm not an expert with Lucene, but I believe that's how Lucene indexes
> work - there is no update, only create and delete.

It is in fact the way Lucene works. The main problem with the update
method in Ferret is that for each update it needs to open an
IndexReader to read and delete the old doc, then close it and open and
IndexWriter to open a new doc. In the version of Ferret I'm working on
now you'll be able to do updates directly on the IndexWriter so it
should be a lot faster.

As for just updating the stored-unindexed fields, I'll have to think
about it. It'll add a bit of complexity to the merge process which I'm
not to keen on. But it is certainly possible. Sergei, what type of
field is it that you need to update? And to everyone else on the list,
is this a common action? That is, do you often need to update
non-indexed fields?

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

Reply via email to