Top |
XapianDocument * | xapian_document_new () |
char * | xapian_document_get_value () |
double | xapian_document_get_numeric_value () |
void | xapian_document_add_value () |
void | xapian_document_add_numeric_value () |
void | xapian_document_remove_value () |
void | xapian_document_clear_values () |
unsigned int | xapian_document_get_values_count () |
char * | xapian_document_get_data () |
void | xapian_document_set_data () |
unsigned int | xapian_document_get_doc_id () |
char * | xapian_document_get_description () |
void | xapian_document_add_posting () |
void | xapian_document_remove_posting () |
void | xapian_document_add_term () |
void | xapian_document_add_term_full () |
void | xapian_document_add_boolean_term () |
void | xapian_document_remove_term () |
void | xapian_document_clear_terms () |
unsigned int | xapian_document_get_termlist_count () |
char * xapian_document_get_value (XapianDocument *document
,unsigned int slot
);
Retrieves the value associated to the slot
number inside document
.
double xapian_document_get_numeric_value (XapianDocument *document
,unsigned int slot
);
Retrieves the numeric value associated to the slot
number inside document
.
Since: 1.4
void xapian_document_add_value (XapianDocument *document
,unsigned int slot
,const char *value
);
Sets (or replaces) value
at the given slot
number inside
the document
.
void xapian_document_add_numeric_value (XapianDocument *document
,unsigned int slot
,double value
);
Sets (or replaces) a value
at the given slot
number
inside the document
.
The given value
will be serialised internally using xapian_sortable_serialise()
.
Since: 1.4
void xapian_document_remove_value (XapianDocument *document
,unsigned int slot
);
Removes any value associated with the slot
number.
void
xapian_document_clear_values (XapianDocument *document
);
Removes all values from document
.
unsigned int
xapian_document_get_values_count (XapianDocument *document
);
Retrieves the number of values in the document
.
char *
xapian_document_get_data (XapianDocument *document
);
Retrieves the content of document
.
This is a potentially expensive operation, so it should not be
used when matching a document; typically, you should use the
values API (xapian_document_add_value()
and xapian_document_get_value()
)
for fast access to matching terms or data.
void xapian_document_set_data (XapianDocument *document
,const char *data
);
Sets the contents of the document
.
unsigned int
xapian_document_get_doc_id (XapianDocument *document
);
Retrieves the document id of document
.
char *
xapian_document_get_description (XapianDocument *document
);
Retrieves a description of document
, typically used when
debugging.
void xapian_document_add_posting (XapianDocument *document
,const char *tname
,unsigned int term_pos
,unsigned int wdf_increment
);
Adds a term to the document, with positional information.
See also: xapian_document_add_term()
, xapian_document_add_term_full()
void xapian_document_remove_posting (XapianDocument *document
,const char *tname
,unsigned int term_pos
,unsigned int wdf_decrement
);
Removes a posting of a term inside document
.
Note that the term will still index the document, even if all the
occurrences have been removed. To completely remove tname
from
the document
, use xapian_document_remove_term()
instead.
void xapian_document_add_term (XapianDocument *document
,const char *tname
);
Adds a term to the document, without positional information, and with a default WDF increment of 1.
void xapian_document_add_term_full (XapianDocument *document
,const char *tname
,unsigned int wdf_increment
);
Adds a term to the document, without positional information.
void xapian_document_add_boolean_term (XapianDocument *document
,const char *tname
);
Adds a term to the document without incrementing the WDF.
This function is the equivalent of xapian_document_add_term_full()
with a WDF increment set to 0.
void xapian_document_remove_term (XapianDocument *document
,const char *tname
);
Removes tname
from the list of terms stored inside document
.
void
xapian_document_clear_terms (XapianDocument *document
);
Clears all the terms stored in the document
.
unsigned int
xapian_document_get_termlist_count (XapianDocument *document
);
Retrieves the number of terms registered in the document
.