00001 00004 /* Copyright (C) 2007,2009 Olly Betts 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License as 00008 * published by the Free Software Foundation; either version 2 of the 00009 * License, or (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 #include <config.h> 00022 00023 #include "postlist.h" 00024 00025 #include <xapian/error.h> 00026 00027 #include "omassert.h" 00028 00029 using namespace std; 00030 00031 namespace Xapian { 00032 00033 PostingIterator::Internal::~Internal() { } 00034 00035 TermFreqs 00036 PostingIterator::Internal::get_termfreq_est_using_stats( 00037 const Xapian::Weight::Internal &) const 00038 { 00039 throw Xapian::InvalidOperationError( 00040 "get_termfreq_est_using_stats() not meaningful for this PostingIterator"); 00041 } 00042 00043 Xapian::termcount 00044 PostingIterator::Internal::get_wdf() const 00045 { 00046 throw Xapian::InvalidOperationError("get_wdf() not meaningful for this PostingIterator"); 00047 } 00048 00049 const string * 00050 PostingIterator::Internal::get_collapse_key() const 00051 { 00052 return NULL; 00053 } 00054 00055 PositionList * 00056 PostList::read_position_list() 00057 { 00058 throw Xapian::InvalidOperationError("read_position_list() not meaningful for this PostingIterator"); 00059 } 00060 00061 PositionList * 00062 PostList::open_position_list() const 00063 { 00064 throw Xapian::InvalidOperationError("open_position_list() not meaningful for this PostingIterator"); 00065 } 00066 00067 PostList * 00068 PostList::check(Xapian::docid did, Xapian::weight w_min, bool &valid) 00069 { 00070 valid = true; 00071 return skip_to(did, w_min); 00072 } 00073 00074 Xapian::termcount 00075 PostList::count_matching_subqs() const 00076 { 00077 Assert(false); 00078 return 0; 00079 } 00080 00081 }