Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Xapian::Query::Internal Class Reference

Internal class, implementing most of Xapian::Query. More...

#include <query.h>

Inheritance diagram for Xapian::Query::Internal:

Inheritance graph
[legend]
Collaboration diagram for Xapian::Query::Internal:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< Internal * > subquery_list
 The container type for storing pointers to subqueries.
typedef int op_t
 Type storing the operation.

Public Member Functions

 Internal (const Query::Internal &copyme)
 Copy constructor.
void operator= (const Query::Internal &copyme)
 Assignment.
 Internal (const std::string &tname_, Xapian::termcount wqf_=1, Xapian::termpos term_pos_=0)
 A query consisting of a single term.
 Internal (op_t op_)
 Create internals given only the operator.
 ~Internal ()
 Destructor.
void add_subquery (const Query::Internal &subq)
 Add a subquery.
Query::Internalend_construction ()
 Finish off the construction.
std::string serialise () const
 Return a string in an easily parsed form which contains all the information in a query.
std::string get_description () const
 Returns a string representing the query.
void set_window (Xapian::termpos window)
 Set window for NEAR or PHRASE queries.
void set_cutoff (double cutoff)
 Set cutoff for *_CUTOFF queries.
void set_elite_set_size (Xapian::termcount size)
 Set elite set size.
Xapian::termcount get_length () const
 Get the length of the query, used by some ranking formulae.
Xapian::termcount set_length (Xapian::termcount qlen_)
 Set the length of the query.
TermIterator get_terms () const
 Return an iterator over all the terms in the query, in order of termpos.

Static Public Member Functions

Xapian::Query::Internalunserialise (const std::string &s)

Static Public Attributes

const int OP_LEAF = -1

Detailed Description

Internal class, implementing most of Xapian::Query.


Member Typedef Documentation

typedef int Xapian::Query::Internal::op_t
 

Type storing the operation.

typedef std::vector<Internal *> Xapian::Query::Internal::subquery_list
 

The container type for storing pointers to subqueries.


Constructor & Destructor Documentation

Xapian::Query::Internal::Internal const Query::Internal copyme  ) 
 

Copy constructor.

Xapian::Query::Internal::Internal const std::string &  tname_,
Xapian::termcount  wqf_ = 1,
Xapian::termpos  term_pos_ = 0
 

A query consisting of a single term.

Xapian::Query::Internal::Internal op_t  op_  ) 
 

Create internals given only the operator.

Xapian::Query::Internal::~Internal  ) 
 

Destructor.


Member Function Documentation

void Xapian::Query::Internal::add_subquery const Query::Internal subq  ) 
 

Add a subquery.

Query::Internal* Xapian::Query::Internal::end_construction  ) 
 

Finish off the construction.

std::string Xapian::Query::Internal::get_description  )  const
 

Returns a string representing the query.

Introspection method.

Xapian::termcount Xapian::Query::Internal::get_length  )  const [inline]
 

Get the length of the query, used by some ranking formulae.

This value is calculated automatically, but may be overridden using set_length().

TermIterator Xapian::Query::Internal::get_terms  )  const
 

Return an iterator over all the terms in the query, in order of termpos.

If multiple terms have the same term position, their order is unspecified. Duplicates (same term and termpos) will be removed.

void Xapian::Query::Internal::operator= const Query::Internal copyme  ) 
 

Assignment.

std::string Xapian::Query::Internal::serialise  )  const
 

Return a string in an easily parsed form which contains all the information in a query.

void Xapian::Query::Internal::set_cutoff double  cutoff  ) 
 

Set cutoff for *_CUTOFF queries.

void Xapian::Query::Internal::set_elite_set_size Xapian::termcount  size  ) 
 

Set elite set size.

Xapian::termcount Xapian::Query::Internal::set_length Xapian::termcount  qlen_  ) 
 

Set the length of the query.

This overrides the automatically calculated value, which may be desirable in some situations. Returns the old value of the query length.

void Xapian::Query::Internal::set_window Xapian::termpos  window  ) 
 

Set window for NEAR or PHRASE queries.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.8.5).
Generated on 23 Dec 2004 by Doxygen 1.3.8.