#include <config.h>
#include <xapian.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include "gnu_getopt.h"
#include <string.h>
Include dependency graph for delve.cc:
Go to the source code of this file.
Defines | |
#define | PROG_NAME "delve" |
#define | PROG_DESC "Inspect the contents of a Xapian database" |
Functions | |
static void | show_usage () |
static void | show_db_stats (Database &db) |
static void | show_values (Database &db, docid docid, char sep) |
static void | show_values (Database &db, vector< docid >::const_iterator i, vector< docid >::const_iterator end) |
static void | show_docdata (Database &db, docid docid, char sep) |
static void | show_docdata (Database &db, vector< docid >::const_iterator i, vector< docid >::const_iterator end) |
static void | show_termlists (Database &db, vector< docid >::const_iterator i, vector< docid >::const_iterator end) |
int | main (int argc, char **argv) |
Variables | |
static char | separator = ' ' |
static bool | verbose = false |
static bool | showvalues = false |
static bool | showdocdata = false |
static Stem | stemmer |
#define PROG_DESC "Inspect the contents of a Xapian database" |
static void show_db_stats | ( | Database & | db | ) | [static] |
Definition at line 65 of file delve.cc.
References Xapian::Database::allterms_begin(), Xapian::Database::allterms_end(), Xapian::Database::get_avlength(), Xapian::Database::get_doccount(), and verbose.
Referenced by main().
static void show_values | ( | Database & | db, | |
docid | docid, | |||
char | sep | |||
) | [static] |
Definition at line 86 of file delve.cc.
References Xapian::Database::get_document(), Xapian::ValueIterator::get_valueno(), Xapian::Document::values_begin(), and Xapian::Document::values_end().
Referenced by main(), and show_values().
static void show_values | ( | Database & | db, | |
vector< docid >::const_iterator | i, | |||
vector< docid >::const_iterator | end | |||
) | [static] |
static void show_docdata | ( | Database & | db, | |
docid | docid, | |||
char | sep | |||
) | [static] |
Definition at line 111 of file delve.cc.
References Xapian::Document::get_data(), and Xapian::Database::get_document().
Referenced by main().
static void show_docdata | ( | Database & | db, | |
vector< docid >::const_iterator | i, | |||
vector< docid >::const_iterator | end | |||
) | [static] |
Definition at line 117 of file delve.cc.
References Xapian::Document::get_data(), and Xapian::Database::get_document().
static void show_termlists | ( | Database & | db, | |
vector< docid >::const_iterator | i, | |||
vector< docid >::const_iterator | end | |||
) | [static] |
Definition at line 129 of file delve.cc.
References Xapian::TermIterator::get_wdf(), separator, Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), and verbose.
Referenced by main().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 153 of file delve.cc.
References atoi(), Xapian::Error::get_description(), Xapian::Document::get_value(), Xapian::PostingIterator::get_wdf(), gnu_getopt(), optarg, optind, PACKAGE_STRING, Xapian::PostingIterator::positionlist_begin(), Xapian::PostingIterator::positionlist_end(), PROG_DESC, PROG_NAME, separator, show_db_stats(), show_docdata(), show_termlists(), show_usage(), show_values(), showdocdata, showvalues, Xapian::PostingIterator::skip_to(), stemmer, and verbose.
char separator = ' ' [static] |
bool verbose = false [static] |
Definition at line 40 of file delve.cc.
Referenced by DEFINE_TESTCASE(), main(), test_driver::parse_command_line(), test_driver::runtest(), show_db_stats(), show_termlists(), and test_packstring1().
bool showvalues = false [static] |
bool showdocdata = false [static] |
Definition at line 150 of file delve.cc.
Referenced by DEFINE_TESTCASE(), main(), FileIndexer::next(), query(), Xapian::TermGenerator::set_stemmer(), Xapian::QueryParser::set_stemmer(), test_qp_flag_partial1(), test_stemdict(), test_stemjunk(), test_stemrandom(), and test_termgen1().