xapian-core
1.4.27
|
Command line search tool using Xapian::QueryParser. More...
#include <config.h>
#include <xapian.h>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include "gnu_getopt.h"
Go to the source code of this file.
Classes | |
struct | tab_entry |
Common string to integer map entry for option decoding. More... | |
Macros | |
#define | PROG_NAME "quest" |
#define | PROG_DESC "Xapian command line search tool" |
#define | INDENT " " |
The number of spaces to indent by in print_table. More... | |
Enumerations | |
enum | { WEIGHT_BB2, WEIGHT_BM25, WEIGHT_BM25PLUS, WEIGHT_BOOL, WEIGHT_COORD, WEIGHT_DLH, WEIGHT_DPH, WEIGHT_IFB2, WEIGHT_INEB2, WEIGHT_INL2, WEIGHT_LM, WEIGHT_PL2, WEIGHT_PL2PLUS, WEIGHT_TFIDF, WEIGHT_TRAD } |
Functions | |
template<typename T , std::size_t N> | |
static int | decode (const T(&table)[N], const char *s) |
Decode a string to an integer. More... | |
template<typename T > | |
static char | print_table (const T &table) |
Print string from a string to integer mapping table. More... | |
static void | show_usage () |
int | main (int argc, char **argv) |
Variables | |
static const char *const | sw [] |
static const tab_entry | flag_tab [] |
static const tab_entry | default_op_tab [] |
static const tab_entry | wt_tab [] |
Command line search tool using Xapian::QueryParser.
Definition in file quest.cc.
#define INDENT " " |
The number of spaces to indent by in print_table.
This needs to match the indent in the help message in show_usage() below.
Definition at line 147 of file quest.cc.
Referenced by print_table().
#define PROG_DESC "Xapian command line search tool" |
#define PROG_NAME "quest" |
Definition at line 36 of file quest.cc.
Referenced by main(), and show_usage().
anonymous enum |
|
static |
Decode a string to an integer.
table | Array of tab_entry in ascending string order. |
s | The string to decode. |
Definition at line 70 of file quest.cc.
Referenced by Xapian::BitReader::decode_interpolative_next(), Xapian::BitReader::init(), and main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 201 of file quest.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::Database::add_database(), Xapian::QueryParser::add_prefix(), Xapian::MSet::begin(), decode(), Xapian::MSet::end(), option::flag, Xapian::QueryParser::FLAG_DEFAULT, Xapian::Stem::get_available_languages(), Xapian::QueryParser::get_corrected_query_string(), Xapian::Document::get_data(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), Xapian::Error::get_msg(), Xapian::MSet::get_termfreq(), Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), gnu_getopt_long(), no_argument, optarg, optind, opts, PACKAGE_STRING, Xapian::QueryParser::parse_query(), PROG_DESC, PROG_NAME, query(), required_argument, Xapian::QueryParser::set_database(), Xapian::QueryParser::set_default_op(), Xapian::Enquire::set_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::set_stopper(), Xapian::Enquire::set_weighting_scheme(), show_usage(), Xapian::QueryParser::STEM_SOME, stemmer, sw, WEIGHT_BB2, WEIGHT_BM25, WEIGHT_BM25PLUS, WEIGHT_BOOL, WEIGHT_COORD, WEIGHT_DLH, WEIGHT_DPH, WEIGHT_IFB2, WEIGHT_INEB2, WEIGHT_INL2, WEIGHT_LM, WEIGHT_PL2, WEIGHT_PL2PLUS, WEIGHT_TFIDF, and WEIGHT_TRAD.
|
static |
Print string from a string to integer mapping table.
table | Array of tab_entry in ascending string order. |
Definition at line 156 of file quest.cc.
References INDENT.
Referenced by show_usage().
|
static |
Definition at line 174 of file quest.cc.
References print_table(), and PROG_NAME.
Referenced by main().
|
static |
|
static |
|
static |
Definition at line 40 of file quest.cc.
Referenced by main().
|
static |