FirteX-高性能全文索引和检索平台API Documentation |
00001 // 00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 00003 // All rights reserved. 00004 // This file is part of FirteX (www.firtex.org) 00005 // 00006 // Use of the FirteX is subject to the terms of the software license set forth in 00007 // the LICENSE file included with this software, and also available at 00008 // http://www.firtex.org/license.html 00009 // 00010 // Author : 郭瑞杰(GuoRuijie) 00011 // Email : ruijieguo@software.ict.ac.cn,ruijieguo@gmail.com 00012 // Created : 2006/5/9 00013 // 00014 #ifndef _REQOPTSCORER_H 00015 #define _REQOPTSCORER_H 00016 00017 #include "Scorer.h" 00018 00019 namespace firtex 00020 { 00021 namespace search 00022 { 00023 class CReqOptScorer : public CScorer 00024 { 00025 public: 00026 CReqOptScorer(CScorer* pReqScorer,CScorer* pOptScorer); 00027 virtual ~CReqOptScorer(void); 00028 public: 00033 count_t nextDocs(); 00034 00041 count_t scores(docid_t*& docs,score_t*& scores); 00042 00050 bool skipTo(docid_t target,docid_t& nearTarget); 00051 00056 bool next(); 00057 00058 /* 00059 * 返回当前位置文档的打分结果,必须配合{@link skipTo(docid_t,DOC_ID)}或{@link next()}使用,只有返回true后才有效 00060 */ 00061 score_t score(); 00062 00063 /* 00064 * 返回当前位置文档ID,必须配合{@link skipTo(docid_t,DOC_ID)}或{@link next()}使用,只有返回true后才有效 00065 */ 00066 docid_t doc(); 00067 protected: 00068 CScorer* m_pReqScorer; 00069 CScorer* m_pOptScorer; 00070 }; 00071 } 00072 } 00073 00074 00075 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex