xapian.Query

xapian :: Query :: Class Query |
[hide private]
[frames] | no frames]

# Class Query

    Class representing a query.

    Queries are represented as a tree of objects.

Instance Methods | [hide private]
__init__(self, *args) Construct a value comparison query on a document value. |
__iter__(self) Get an iterator over the terms in a query. |
__repr__(self) repr(x) |
__str__(...) Return a string describing this object. |
__swig_destroy__(...) Destructor. |
empty(...) Test if the query is empty (i.e. |
get_description(...) Return a string describing this object. |
get_length(...) Get the length of the query, used by some ranking formulae. |
get_terms_begin(...) Return a Xapian::TermIterator returning all the terms in the query, in order of termpos. |
get_terms_end(...) Return a Xapian::TermIterator to the end of the list of terms in the query. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]
| OP_AND = `0`
| OP_AND_MAYBE = `4`
| OP_AND_NOT = `2`
| OP_ELITE_SET = `10`
| OP_FILTER = `5`
| OP_NEAR = `6`
| OP_OR = `1`
| OP_PHRASE = `7`
| OP_SCALE_WEIGHT = `9`
| OP_VALUE_GE = `11`
| OP_VALUE_LE = `12`
| OP_VALUE_RANGE = `8`
| OP_XOR = `3`

Properties | [hide private]
| thisown The membership flag
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args) (Constructor) |
    Construct a value comparison query on a document value.

    Xapian::Query::Query(Query::op op_, Xapian::valueno valno, const
    std::string &value)

    This query matches those documents which have a value stored in the
    slot given by valno which compares, as specified by the operator, to
    value.

    Parameters:
    -----------

    op_:  The operator to use for the query. Currently, must be
    OP_VALUE_GE or OP_VALUE_LE.

    valno:  The slot number to get the value from.

    value:  The value to compare.
Overrides: object.__init__

### __iter__(self) |
    Get an iterator over the terms in a query.

    The iterator will return string objects.

### __repr__(self) (Representation operator) |
repr(x) Overrides: object.__repr__ (inherited documentation)

### __str__(...) (Informal representation operator) |
    Return a string describing this object.

    std::string Xapian::Query::get_description() const
Overrides: object.__str__

### __swig_destroy__(...) |
Destructor. Xapian::Query::~Query()

### empty(...) |
    Test if the query is empty (i.e.

    bool Xapian::Query::empty() const

    was constructed using the default ctor or with an empty iterator
    ctor).

### get_description(...) |
    Return a string describing this object.

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

### get_length(...) |
    Get the length of the query, used by some ranking formulae.

    Xapian::termcount Xapian::Query::get_length() const

    This value is calculated automatically - if you want to override it
    you can pass a different value to Enquire::set_query().

### get_terms_begin(...) |
    Return a Xapian::TermIterator returning all the terms in the query, in
    order of termpos.

    TermIterator Xapian::Query::get_terms_begin() const

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

### get_terms_end(...) |
    Return a Xapian::TermIterator to the end of the list of terms in the
    query.

    TermIterator Xapian::Query::get_terms_end() const

Property Details | [hide private]

### thisown
    The membership flag
Get Method: unreachable(x) Set Method: unreachable(x, v)