parcel | Lucy |
class variable | LUCY_INDEXMANAGER |
struct symbol | lucy_IndexManager |
class nickname | lucy_IxManager |
header file | Lucy/Index/IndexManager.h |
Lucy::Index::IndexManager – Policies governing index updating, locking, and file deletion.
IndexManager is an advanced-use class for controlling index locking, updating, merging, and deletion behaviors.
IndexManager and Architecture are complementary classes: Architecture is used to define traits and behaviors which cannot change for the life of an index; IndexManager is used for defining rules which may change from process to process.
lucy_IndexManager* // incremented
lucy_IxManager_new(
cfish_String *host,
lucy_LockFactory *lock_factory
);
Create a new IndexManager.
An identifier which should be unique per-machine.
A LockFactory.
lucy_IndexManager*
lucy_IxManager_init(
lucy_IndexManager *self,
cfish_String *host,
lucy_LockFactory *lock_factory
);
Initialize an IndexManager.
An identifier which should be unique per-machine.
A LockFactory.
void
lucy_IxManager_Set_Folder(
lucy_IndexManager *self,
lucy_Folder *folder
);
Setter for folder
member. Typical clients (Indexer,
IndexReader) will use this method to install their own Folder instance.
lucy_Folder*
lucy_IxManager_Get_Folder(
lucy_IndexManager *self
);
Getter for folder
member.
cfish_String*
lucy_IxManager_Get_Host(
lucy_IndexManager *self
);
Getter for host
member.
cfish_Vector* // incremented
lucy_IxManager_Recycle(
lucy_IndexManager *self,
lucy_PolyReader *reader,
lucy_DeletionsWriter *del_writer,
int64_t cutoff,
bool optimize
);
Return an array of SegReaders representing segments that should be consolidated. Implementations must balance index-time churn against search-time degradation due to segment proliferation. The default implementation prefers small segments or segments with a high proportion of deletions.
A PolyReader.
A DeletionsWriter.
A segment number which all returned SegReaders must exceed.
A boolean indicating whether to spend extra time optimizing the index for search-time performance.
lucy_Lock* // incremented
lucy_IxManager_Make_Write_Lock(
lucy_IndexManager *self
);
Create the Lock which controls access to modifying the logical content of the index.
void
lucy_IxManager_Set_Write_Lock_Timeout(
lucy_IndexManager *self,
uint32_t timeout
);
Setter for write lock timeout. Default: 1000 milliseconds.
uint32_t
lucy_IxManager_Get_Write_Lock_Timeout(
lucy_IndexManager *self
);
Getter for write lock timeout.
void
lucy_IxManager_Set_Write_Lock_Interval(
lucy_IndexManager *self,
uint32_t timeout
);
Setter for write lock retry interval. Default: 100 milliseconds.
uint32_t
lucy_IxManager_Get_Write_Lock_Interval(
lucy_IndexManager *self
);
Getter for write lock retry interval.
Lucy::Index::IndexManager is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.