NetworkTermList Class Reference

A term list for a database on the other side of a network connection. More...

#include <net_termlist.h>

Inheritance diagram for NetworkTermList:

Inheritance graph
[legend]
Collaboration diagram for NetworkTermList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Xapian::termcount get_approx_size () const
 Get the number of terms in the termlist.
void accumulate_stats (Xapian::Internal::ExpandStats &stats) const
string get_termname () const
Xapian::termcount get_wdf () const
Xapian::doccount get_termfreq () const
TermListnext ()
bool at_end () const
Xapian::termcount positionlist_count () const
Xapian::PositionIterator positionlist_begin () const

Private Member Functions

 NetworkTermList (Xapian::doclength document_length_, Xapian::doccount database_size_, Xapian::Internal::RefCntPtr< const RemoteDatabase > this_db_, Xapian::docid did_)
 Standard constructor is private: NetworkTermLists are created by RemoteDatabase object only, which is a friend.

Private Attributes

vector< NetworkTermListItemitems
 The list of items comprising the termlist.
vector< NetworkTermListItem
>::const_iterator 
current_position
 The current position in the list.
bool started
 Whether we have yet started iterating through the list.
Xapian::doclength document_length
 The length of the document for which this is the termlist.
Xapian::doccount database_size
 The number of documents in the database in which this document resides.
Xapian::Internal::RefCntPtr<
const RemoteDatabase
this_db
 Keep a reference to our database.
Xapian::docid did
 The id of the document this termlist came from (or 0 if not applicable).

Friends

class RemoteDatabase

Detailed Description

A term list for a database on the other side of a network connection.

The termlist is serialised across the network, and rebuilt into this object on the client side.

Definition at line 61 of file net_termlist.h.


Constructor & Destructor Documentation

NetworkTermList::NetworkTermList ( Xapian::doclength  document_length_,
Xapian::doccount  database_size_,
Xapian::Internal::RefCntPtr< const RemoteDatabase this_db_,
Xapian::docid  did_ 
) [private]

Standard constructor is private: NetworkTermLists are created by RemoteDatabase object only, which is a friend.

Parameters:
average_length_ The (non-normalised) length of the document
database_size_ The number of documents in the database
this_db_ The database
did_ The document id

Definition at line 33 of file net_termlist.cc.


Member Function Documentation

Xapian::termcount NetworkTermList::get_approx_size (  )  const

Get the number of terms in the termlist.

Definition at line 48 of file net_termlist.cc.

References items.

void NetworkTermList::accumulate_stats ( Xapian::Internal::ExpandStats stats  )  const

Definition at line 54 of file net_termlist.cc.

References Xapian::Internal::ExpandStats::accumulate(), Assert, at_end(), current_position, database_size, document_length, and started.

string NetworkTermList::get_termname (  )  const

Definition at line 66 of file net_termlist.cc.

References Assert, at_end(), current_position, and started.

Referenced by positionlist_begin().

Xapian::termcount NetworkTermList::get_wdf (  )  const

Definition at line 74 of file net_termlist.cc.

References Assert, at_end(), current_position, and started.

Xapian::doccount NetworkTermList::get_termfreq (  )  const

Definition at line 82 of file net_termlist.cc.

References Assert, at_end(), current_position, and started.

TermList * NetworkTermList::next (  ) 

Definition at line 90 of file net_termlist.cc.

References Assert, at_end(), current_position, and started.

bool NetworkTermList::at_end (  )  const

Definition at line 102 of file net_termlist.cc.

References Assert, current_position, items, and started.

Referenced by accumulate_stats(), get_termfreq(), get_termname(), get_wdf(), and next().

Xapian::termcount NetworkTermList::positionlist_count (  )  const

Definition at line 109 of file net_termlist.cc.

Xapian::PositionIterator NetworkTermList::positionlist_begin (  )  const

Definition at line 115 of file net_termlist.cc.

References did, get_termname(), and this_db.


Friends And Related Function Documentation

friend class RemoteDatabase [friend]

Definition at line 62 of file net_termlist.h.


Member Data Documentation

vector<NetworkTermListItem> NetworkTermList::items [private]

The list of items comprising the termlist.

Definition at line 66 of file net_termlist.h.

Referenced by at_end(), and get_approx_size().

vector<NetworkTermListItem>::const_iterator NetworkTermList::current_position [private]

The current position in the list.

Definition at line 70 of file net_termlist.h.

Referenced by accumulate_stats(), at_end(), get_termfreq(), get_termname(), get_wdf(), and next().

bool NetworkTermList::started [private]

Whether we have yet started iterating through the list.

Definition at line 74 of file net_termlist.h.

Referenced by accumulate_stats(), at_end(), get_termfreq(), get_termname(), get_wdf(), and next().

Xapian::doclength NetworkTermList::document_length [private]

The length of the document for which this is the termlist.

Note that this is not a normalised document length.

Definition at line 80 of file net_termlist.h.

Referenced by accumulate_stats().

Xapian::doccount NetworkTermList::database_size [private]

The number of documents in the database in which this document resides.

Note that this may not be the number of documents in the combined database when multiple databases are being searched.

Definition at line 88 of file net_termlist.h.

Referenced by accumulate_stats().

Xapian::Internal::RefCntPtr<const RemoteDatabase> NetworkTermList::this_db [private]

Keep a reference to our database.

Definition at line 91 of file net_termlist.h.

Referenced by positionlist_begin().

Xapian::docid NetworkTermList::did [private]

The id of the document this termlist came from (or 0 if not applicable).

Definition at line 94 of file net_termlist.h.

Referenced by positionlist_begin().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.