CLucene - a full-featured, c++ search engine
API Documentation
00001 /*------------------------------------------------------------------------------ 00002 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team 00003 * 00004 * Distributable under the terms of either the Apache License (Version 2.0) or 00005 * the GNU Lesser General Public License, as specified in the COPYING file. 00006 ------------------------------------------------------------------------------*/ 00007 #ifndef _lucene_search_Scorer_ 00008 #define _lucene_search_Scorer_ 00009 00010 00011 CL_CLASS_DEF(search,Similarity) 00012 CL_CLASS_DEF(search,HitCollector) 00013 CL_CLASS_DEF(search,Explanation) 00014 //#include "Similarity.h" 00015 //#include "SearchHeader.h" 00016 00017 CL_NS_DEF(search) 00019 class CLUCENE_EXPORT Scorer: LUCENE_BASE { 00020 private: 00021 Similarity* similarity; 00022 protected: 00024 Scorer(Similarity* similarity); 00025 00026 public: 00027 virtual ~Scorer(); 00028 00030 Similarity* getSimilarity() const; 00031 00033 virtual void score(HitCollector* hc) ; 00034 00035 virtual bool score( HitCollector* results, const int32_t maxDoc ); 00036 00039 virtual bool next() = 0; 00040 00043 virtual int32_t doc() const = 0; 00044 00047 virtual float_t score() = 0; 00048 00062 virtual bool skipTo(int32_t target) = 0; 00063 00065 virtual void explain(int32_t doc, Explanation* ret) = 0; 00066 00067 00069 virtual TCHAR* toString() = 0; 00070 00071 }; 00072 CL_NS_END 00073 #endif