Bringing tree up to date.
[galago.git] / cpp / galago / include / DocumentOrderedBinnedIndex.hpp
blobe207e4df60e83163e1b3377f65e879e1074d7105
2 //
3 // DocumentOrderedBinnedIndex
4 //
5 // 15 October 2007 -- tds
6 //
7 // BSD License (http://galagosearch.org/license)
8 //
10 #ifndef GALAGO_DOCUMENTORDEREDBINNEDINDEX_HPP
11 #define GALAGO_DOCUMENTORDEREDBINNEDINDEX_HPP
13 #include <string>
14 #include <map>
15 #include "DocumentOrderedBinnedListReader.hpp"
16 #include "DocumentOrderedBinnedIterator.hpp"
17 #include "DocumentNameReader.hpp"
18 #include "indri/Parameters.hpp"
20 class DocumentOrderedBinnedIndex {
21 private:
22 std::map<std::string, DocumentOrderedBinnedListReader*> _readers;
23 std::string _path;
25 DocumentNameReader _documents;
26 indri::api::Parameters _parameters;
28 public:
29 void openRead( const std::string& path );
30 void close();
32 DocumentOrderedBinnedIterator* getTerm( const std::string& term ) const;
33 DocumentOrderedBinnedIterator* getTerm( const std::string& term, const std::string& field ) const;
35 DocumentOrderedBinnedListReader* getReader() const;
36 DocumentOrderedBinnedListReader* getReader( const std::string& field ) const;
38 std::string getDocument( int document );
41 #endif // GALAGO_DOCUMENTORDEREDBINNEDINDEX_HPP