00001 00004 /* Copyright (C) 2007 Olly Betts 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef XAPIAN_INCLUDED_FLINT_TERMLISTTABLE_H 00022 #define XAPIAN_INCLUDED_FLINT_TERMLISTTABLE_H 00023 00024 #include <xapian/types.h> 00025 00026 #include "flint_table.h" 00027 #include "flint_utils.h" 00028 00029 #include <string> 00030 00031 namespace Xapian { 00032 class Document; 00033 } 00034 00035 class FlintTermListTable : public FlintTable { 00036 public: 00045 FlintTermListTable(std::string dbdir, bool readonly) 00046 : FlintTable(dbdir + "/termlist.", readonly, Z_DEFAULT_STRATEGY) { } 00047 00056 void set_termlist(Xapian::docid did, const Xapian::Document & doc, 00057 flint_doclen_t doclen); 00058 00063 void delete_termlist(Xapian::docid did) { del(flint_docid_to_key(did)); } 00064 00066 flint_doclen_t get_doclength(Xapian::docid did) const; 00067 }; 00068 00069 #endif // XAPIAN_INCLUDED_FLINT_TERMLISTTABLE_H