Mailing List Archive

simpley way to optimize index
Hi,

I'm about to write a cronjob which should optimize my kinosearch indexes
for my various tables and I wonder if there is a simple way of opening
an index (without having to specify analyzers, spec fields and so on.
Just open the index and call optimize on it. Or do I have to re-open the
index with all the analyzers then specify all the fields before I can
call $invindexer->finish( optimize => 1); ??

And does the indexer optimize the index of I don't add or delete any
deocuments??

Thanks for letting me know

Marc
simpley way to optimize index [ In reply to ]
On Oct 18, 2006, at 10:23 PM, Marc Elser wrote:

> Hi,
>
> I'm about to write a cronjob which should optimize my kinosearch
> indexes for my various tables and I wonder if there is a simple way
> of opening an index (without having to specify analyzers, spec
> fields and so on. Just open the index and call optimize on it. Or
> do I have to re-open the index with all the analyzers then specify
> all the fields before I can call $invindexer->finish( optimize =>
> 1); ??

Yes, you have to call those routines. The restriction may be lifted
in the future, but for now you have to call them. If there's too
much code duplication, maybe put the invindex creation routines into
a module.

> And does the indexer optimize the index of I don't add or delete
> any deocuments??

If you call $invindexer->( optimize => 1 ), it should always fully
optimize the index, regardless. It would be bad design for it to
behave otherwise.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/