|
xapian-core
2.0.0
|
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"#include "stringutils.h"
Include dependency graph for xapian-quest.cc: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 "xapian-quest" |
| #define | PROG_DESC "Xapian command line search tool" |
| #define | INDENT " " |
| The number of spaces to indent by in print_table. More... | |
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 strings from a string to integer mapping table. More... | |
| static char | print_stemmers () |
| Print available stemmers, line wrapped. More... | |
| template<typename T > | |
| static void | list_table (const T &table) |
| List strings from a string to integer mapping table, one per line. 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 | stem_strategy_tab [] |
Command line search tool using Xapian::QueryParser.
Definition in file xapian-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 125 of file xapian-quest.cc.
| #define PROG_DESC "Xapian command line search tool" |
Definition at line 37 of file xapian-quest.cc.
| #define PROG_NAME "xapian-quest" |
Definition at line 36 of file xapian-quest.cc.
|
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 xapian-quest.cc.
References p.
Referenced by Xapian::BitReader::decode_interpolative_next(), and main().
|
static |
List strings from a string to integer mapping table, one per line.
| table | Array of tab_entry in ascending string order. |
Definition at line 183 of file xapian-quest.cc.
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 224 of file xapian-quest.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::Database::add_database(), Xapian::QueryParser::add_prefix(), Xapian::MSet::begin(), Xapian::Weight::create(), decode(), default_op_tab, Xapian::MSet::end(), option::flag, Xapian::QueryParser::FLAG_DEFAULT, flag_tab, Xapian::Stem::get_available_languages(), Xapian::QueryParser::get_corrected_query_string(), Xapian::Document::get_data(), 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::MSet::get_termfreq(), Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), gnu_getopt_long(), list_table(), long_opts, no_argument, optarg, optind, opts, p, 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(), stem_strategy_tab, stemmer, sw, and term.
|
static |
Print available stemmers, line wrapped.
Definition at line 154 of file xapian-quest.cc.
References Xapian::Stem::get_available_languages(), INDENT, p, and pos.
Referenced by show_usage().
|
static |
Print strings from a string to integer mapping table.
| table | Array of tab_entry in ascending string order. |
Definition at line 134 of file xapian-quest.cc.
Referenced by show_usage().
|
static |
Definition at line 190 of file xapian-quest.cc.
References default_op_tab, flag_tab, print_stemmers(), print_table(), PROG_NAME, and stem_strategy_tab.
Referenced by main().
|
static |
Definition at line 103 of file xapian-quest.cc.
Referenced by main(), and show_usage().
|
static |
Definition at line 78 of file xapian-quest.cc.
Referenced by main(), and show_usage().
|
static |
Definition at line 113 of file xapian-quest.cc.
Referenced by main(), and show_usage().
|
static |
Definition at line 40 of file xapian-quest.cc.
Referenced by main().