xapian-core  1.4.26
Macros | Enumerations | Functions | Variables
xapian-delve.cc File Reference

Allow inspection of the contents of a Xapian database. More...

#include <config.h>
#include <xapian.h>
#include <algorithm>
#include <ios>
#include <iostream>
#include <vector>
#include "gnu_getopt.h"
#include <cerrno>
#include <cstring>
#include <cstdlib>
#include "unicode/description_append.h"
#include "unicode/description_append.cc"
+ Include dependency graph for xapian-delve.cc:

Go to the source code of this file.

Macros

#define PROG_NAME   "delve"
 
#define PROG_DESC   "Inspect the contents of a Xapian database"
 

Enumerations

enum  { VALUE_ESCAPE, VALUE_SORTABLE_SERIALISE, VALUE_PACKED_INT, VALUE_RAW }
 

Functions

static void show_usage ()
 
static void show_db_stats (Database &db)
 
static void decode_and_show_value (const string &value)
 
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_value (Database &db, vector< docid >::const_iterator i, vector< docid >::const_iterator end, Xapian::valueno slot)
 
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_termlist (const Database &db, Xapian::docid did, const char *all_pfx=NULL)
 
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 int verbose = 0
 
static bool showvalues = false
 
static bool showdocdata = false
 
static bool count_zero_length_docs = false
 
static enum { ... }  value_decode = VALUE_ESCAPE
 

Detailed Description

Allow inspection of the contents of a Xapian database.

Definition in file xapian-delve.cc.

Macro Definition Documentation

◆ PROG_DESC

#define PROG_DESC   "Inspect the contents of a Xapian database"

Definition at line 61 of file xapian-delve.cc.

Referenced by main().

◆ PROG_NAME

#define PROG_NAME   "delve"

Definition at line 60 of file xapian-delve.cc.

Referenced by main(), and show_usage().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VALUE_ESCAPE 
VALUE_SORTABLE_SERIALISE 
VALUE_PACKED_INT 
VALUE_RAW 

Definition at line 53 of file xapian-delve.cc.

Function Documentation

◆ decode_and_show_value()

static void decode_and_show_value ( const string &  value)
static

◆ main()

int main ( int  argc,
char **  argv 
)

◆ show_db_stats()

static void show_db_stats ( Database db)
static

◆ show_docdata() [1/2]

static void show_docdata ( Database db,
docid  docid,
char  sep 
)
static

Definition at line 226 of file xapian-delve.cc.

References Xapian::Document::get_data(), and Xapian::Database::get_document().

Referenced by main().

◆ show_docdata() [2/2]

static void show_docdata ( Database db,
vector< docid >::const_iterator  i,
vector< docid >::const_iterator  end 
)
static

◆ show_termlist()

static void show_termlist ( const Database db,
Xapian::docid  did,
const char *  all_pfx = NULL 
)
static

◆ show_termlists()

static void show_termlists ( Database db,
vector< docid >::const_iterator  i,
vector< docid >::const_iterator  end 
)
static

Definition at line 288 of file xapian-delve.cc.

References show_termlist().

Referenced by main().

◆ show_usage()

static void show_usage ( )
static

Definition at line 63 of file xapian-delve.cc.

References PROG_NAME.

Referenced by main().

◆ show_value()

static void show_value ( Database db,
vector< docid >::const_iterator  i,
vector< docid >::const_iterator  end,
Xapian::valueno  slot 
)
static

◆ show_values() [1/2]

static void show_values ( Database db,
docid  docid,
char  sep 
)
static

◆ show_values() [2/2]

static void show_values ( Database db,
vector< docid >::const_iterator  i,
vector< docid >::const_iterator  end 
)
static

Definition at line 198 of file xapian-delve.cc.

References separator, and show_values().

Variable Documentation

◆ count_zero_length_docs

bool count_zero_length_docs = false
static

Definition at line 50 of file xapian-delve.cc.

Referenced by main(), and show_db_stats().

◆ separator

char separator = ' '
static

Definition at line 45 of file xapian-delve.cc.

Referenced by main(), show_termlist(), and show_values().

◆ showdocdata

bool showdocdata = false
static

Definition at line 49 of file xapian-delve.cc.

Referenced by main().

◆ showvalues

bool showvalues = false
static

Definition at line 48 of file xapian-delve.cc.

Referenced by main().

◆ value_decode

enum { ... } value_decode

Referenced by decode_and_show_value(), and main().

◆ verbose

int verbose = 0
static