Lucene++ - a full-featured, c++ search engine
API Documentation

Loading...
Searching...
No Matches
IndexCommit.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef INDEXCOMMIT_H
8#define INDEXCOMMIT_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
22 class LPPAPI IndexCommit : public LuceneObject {
23 public:
24 virtual ~IndexCommit();
25
26 LUCENE_CLASS(IndexCommit);
27
28 public:
30 virtual String getSegmentsFileName() = 0;
31
33 virtual HashSet<String> getFileNames() = 0;
34
36 virtual DirectoryPtr getDirectory() = 0;
37
46 virtual void deleteCommit() = 0;
47
48 virtual bool isDeleted() = 0;
49
51 virtual bool isOptimized() = 0;
52
54 virtual bool equals(const LuceneObjectPtr& other);
55
56 virtual int32_t hashCode();
57
60 virtual int64_t getVersion() = 0;
61
63 virtual int64_t getGeneration() = 0;
64
67 virtual int64_t getTimestamp();
68
71 virtual MapStringString getUserData() = 0;
72};
73
74}
75
76#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::HashSet
Utility template class to handle hash set collections that can be safely copied and shared.
Definition HashSet.h:17
Lucene::IndexCommit
Represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
Definition IndexCommit.h:22
Lucene::IndexCommit::~IndexCommit
virtual ~IndexCommit()
Lucene::IndexCommit::getDirectory
virtual DirectoryPtr getDirectory()=0
Returns the Directory for the index.
Lucene::IndexCommit::getUserData
virtual MapStringString getUserData()=0
Returns userData, previously passed to IndexWriter#commit(Map) for this commit. Map is String -> Stri...
Lucene::IndexCommit::getGeneration
virtual int64_t getGeneration()=0
Returns the generation (the _N in segments_N) for this IndexCommit.
Lucene::IndexCommit::getSegmentsFileName
virtual String getSegmentsFileName()=0
Get the segments file (segments_N) associated with this commit point.
Lucene::IndexCommit::deleteCommit
virtual void deleteCommit()=0
Delete this commit point. This only applies when using the commit point in the context of IndexWriter...
Lucene::IndexCommit::equals
virtual bool equals(const LuceneObjectPtr &other)
Two IndexCommits are equal if both their Directory and versions are equal.
Lucene::IndexCommit::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::IndexCommit::getFileNames
virtual HashSet< String > getFileNames()=0
Returns all index files referenced by this commit point.
Lucene::IndexCommit::isOptimized
virtual bool isOptimized()=0
Returns true if this commit is an optimized index.
Lucene::IndexCommit::isDeleted
virtual bool isDeleted()=0
Lucene::IndexCommit::getTimestamp
virtual int64_t getTimestamp()
Convenience method that returns the last modified time of the segments_N file corresponding to this i...
Lucene::IndexCommit::getVersion
virtual int64_t getVersion()=0
Returns the version for this IndexCommit. This is the same value that IndexReader#getVersion would re...
Lucene::LuceneObject
Base class for all Lucene classes.
Definition LuceneObject.h:31
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::DirectoryPtr
boost::shared_ptr< Directory > DirectoryPtr
Definition LuceneTypes.h:489

clucene.sourceforge.net