Initial import into git.
[galago.git] / cpp / galago / include / BinnedIndex.hpp
blob4396f6d0936231f42258b909cc59834fee7fd004
2 //
3 // BinnedIndex
4 //
5 // 5 January 2007 -- tds
6 //
8 #ifndef GALAGO_BINNEDINDEX_HPP
9 #define GALAGO_BINNEDINDEX_HPP
11 #include "DocumentNameReader.hpp"
12 #include "indri/Parameters.hpp"
13 #include <map>
14 #include "BinnedFeatureIndex.hpp"
15 #include <vector>
16 #include <string>
17 #include "Query.hpp"
19 class BinnedIndex {
20 private:
21 DocumentNameReader _documents;
22 indri::api::Parameters _parameters;
23 std::map<std::string, BinnedFeatureIndex*> _features;
24 int _bins;
25 bool _requiresWeighting;
27 BinnedFeatureIndex* _getIndex( const std::string& feature ) const;
29 public:
30 ~BinnedIndex();
31 void openRead( const std::string& pathname );
33 void close();
34 int bins();
35 std::vector<std::string> getFeatureNames() const;
36 BinOrderedBinnedIterator* getIterator( const std::string& feature, const std::string& term ) const;
37 std::string getDocument( int index ) const;
38 std::vector<QueryTerm> processTerms( const std::vector<QueryTerm>& terms ) const;
40 bool requiresWeighting() const;
41 UINT64 maximumDocumentCount() const;
44 #endif // GALAGO_BINNEDINDEX_HPP