00001 /*========================================================================== 00002 * Copyright (c) 2002 University of Massachusetts. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 #ifndef _INCPASSAGEPUSHINDEX_HPP 00013 #define _INCPASSAGEPUSHINDEX_HPP 00014 00016 00025 /* 00026 * NAME DATE - COMMENTS 00027 * dmf 07/24 - subclassed to make passage indexer 00028 ======================================================================*/ 00029 #include "IncFPPushIndex.hpp" 00030 00031 class IncPassagePushIndex : public IncFPPushIndex { 00032 public: 00033 IncPassagePushIndex(const string &prefix="DefaultIndex", int psgSize=50, 00034 int cachesize=128000000, long maxfilesize=2100000000); 00035 IncPassagePushIndex(int psgSize); 00036 virtual ~IncPassagePushIndex(); 00038 void setPassageSize(int n); 00040 virtual bool beginDoc(const DocumentProps* dp); 00041 00043 virtual bool addTerm(const Term& t); 00044 00046 virtual void doendDoc(const DocumentProps* dp, int mgrid); 00047 00048 private: 00050 int passageSize; 00052 int passageEnd; 00054 int psgCounter; 00056 // DocumentProps *curDoc; 00058 string curDocName; 00059 }; 00060 00061 #endif