#include "CLucene/StdHeader.h" #ifndef _lucene_search_PhraseScorer_ #define _lucene_search_PhraseScorer_ #include "PhraseQueue.h" #include "PhrasePositions.h" #include "HitCollector.h" #include "Scorer.h" #include "Similarity.h" namespace lucene{ namespace search{ class PhraseScorer: public Scorer { protected: l_byte_t* norms; float_t weight; PhraseQueue& pq; PhrasePositions* first; PhrasePositions* last; public: PhraseScorer(TermPositions** tps, const int_t tpsLength, l_byte_t* n, float_t w); ~PhraseScorer(); void score(HitCollector& results, const int_t end); protected: virtual float_t phraseFreq() =0; void pqToList(); void firstToLast(); }; }} #endif