Lucene++ - a full-featured, c++ search engine
API Documentation
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
boost::shared_ptr< LockFactory > LockFactoryPtr
Definition: LuceneTypes.h:497
A Directory is a flat list of files. Files may be written once, when they are created....
Definition: Directory.h:18
virtual int64_t fileLength(const String &name)=0
Returns the length of a file in the directory.
boost::shared_ptr< Lock > LockPtr
Definition: LuceneTypes.h:496
virtual HashSet< String > listAll()=0
Returns an array of strings, one for each file in the directory.
virtual IndexOutputPtr createOutput(const String &name)=0
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.
virtual IndexInputPtr openInput(const String &name)=0
Returns a stream reading an existing file.
virtual bool fileExists(const String &name)=0
Returns true if a file with the given name exists.
virtual void deleteFile(const String &name)=0
Removes an existing file in the directory.
virtual void sync(const String &name)
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit ...
LockFactoryPtr lockFactory
Holds the LockFactory instance (implements locking for this Directory instance).
Definition: Directory.h:29
Definition: AbstractAllTermDocs.h:12
virtual void touchFile(const String &name)=0
Set the modified time of an existing file to now.
void clearLock(const String &name)
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you...
virtual String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory ...
Base class for all Lucene classes.
Definition: LuceneObject.h:31
void setLockFactory(const LockFactoryPtr &lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation....
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
static void copy(const DirectoryPtr &src, const DirectoryPtr &dest, bool closeDirSrc)
Copy contents of a directory src to a directory dest. If a file in src already exists in dest then th...
virtual LockPtr makeLock(const String &name)
Construct a Lock.
virtual IndexInputPtr openInput(const String &name, int32_t bufferSize)
Returns a stream reading an existing file, with the specified read buffer size. The particular Direct...
bool isOpen
Definition: Directory.h:23
boost::shared_ptr< Directory > DirectoryPtr
Definition: LuceneTypes.h:489
virtual String toString()
Returns a string representation of the object.
virtual void close()=0
Closes the store.
virtual uint64_t fileModified(const String &name)=0
Returns the time the named file was last modified.
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494
LockFactoryPtr getLockFactory()
Get the LockFactory that this Directory instance is using for its locking implementation....
clucene.sourceforge.net