5 // 5 January 2007 -- tds
7 // BSD License (http://galagosearch.org/license)
10 #ifndef GALAGO_BINNEDFEATUREINDEX_HPP
11 #define GALAGO_BINNEDFEATUREINDEX_HPP
13 #include "indri/Parameters.hpp"
14 #include "BinOrderedBinnedIterator.hpp"
15 #include "Stemmer.hpp"
16 #include "Normalizer.hpp"
18 #include "Stopper.hpp"
19 #include "IndexReader.hpp"
21 #define BINNEDFEATUREINDEX_MAX_TERM_LENGTH (512)
22 #define BINNEDFEATUREINDEX_VOCAB_GROUP (16)
23 #define BINNEDFEATUREINDEX_BLOCK_SIZE (1<<16)
25 class BinnedFeatureIndex
{
31 Normalizer normalizer
;
33 UINT64 _maximumDocumentCount
;
34 bool _requiresWeighting
;
36 void _build_stemmer();
37 void _build_stopper();
40 static const int blockSize
= BINNEDFEATUREINDEX_BLOCK_SIZE
;
41 static const int vocabGroup
= BINNEDFEATUREINDEX_VOCAB_GROUP
;
42 static const char maxTermLength
= BINNEDFEATUREINDEX_MAX_TERM_LENGTH
;
46 ~BinnedFeatureIndex();
48 void openRead( const std::string
& indexPath
);
50 BinOrderedBinnedIterator
* getTerm( const std::string
& term
) const;
51 QueryTerm
processTerm( const QueryTerm
& term
) const;
52 UINT64
maximumDocumentCount() const;
53 bool requiresWeighting() const;
56 #endif // GALAGO_BINNEDFEATUREINDEX_HPP