XapianTermIterator

XapianTermIterator — Iterate over terms

Functions

Object Hierarchy

    GObject
    ╰── XapianTermIterator

Description

XapianTermIterator is a class that allows iterating over terms.

A typical example is:

1
2
3
4
XapianTermIterator *iter = xapian_database_enumerate_all_terms (db);

while (xapian_term_iterator_next (iter))
  g_print ("%s", xapian_term_iterator_get_term (iter));

Functions

xapian_term_iterator_next ()

gboolean
xapian_term_iterator_next (XapianTermIterator *iter);

Advances the iter forward.

You should use the return value to check if iter is still valid after being advanced, before using the XapianTermIterator API.

Parameters

iter

a XapianTermIterator

 

Returns

TRUE if the iterator was advanced, and FALSE otherwise

Since: 1.6


xapian_term_iterator_get_term_name ()

char *
xapian_term_iterator_get_term_name (XapianTermIterator *iter);

Retrieves the term name of the current item pointed by iter .

Parameters

iter

a XapianTermIterator

 

Returns

the term name.

[transfer full]

Since: 1.6


xapian_term_iterator_get_wdf ()

unsigned int
xapian_term_iterator_get_wdf (XapianTermIterator *iter,
                              GError **error);

Retrieves the WDF of the current item pointed by iter .

Parameters

iter

a XapianTermIterator

 

error

return location for a GError

 

Returns

the WDF

Since: 1.6


xapian_term_iterator_get_term_freq ()

gboolean
xapian_term_iterator_get_term_freq (XapianTermIterator *iter,
                                    unsigned int *res,
                                    GError **error);

Retrieves the term frequency of the current item pointed by iter .

Parameters

iter

a XapianTermIterator

 

res

Used to return the term frequency.

[out]

error

return location for a GError

 

Returns

TRUE if the term frequency was successfully returned

Since: 1.6


xapian_term_iterator_get_description ()

char *
xapian_term_iterator_get_description (XapianTermIterator *iter);

Retrieves a description of iter , typically used for debugging.

Parameters

iter

a XapianTermIterator

 

Returns

a description of the iterator.

[transfer full]

Since: 1.6

Types and Values