2 * @brief: Omega functions for running queries, etc.
4 /* Copyright (C) 2007,2011,2016 Olly Betts
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef OMEGA_INCLUDED_QUERY_H
22 #define OMEGA_INCLUDED_QUERY_H
29 extern Xapian::Query::op default_op
;
31 void add_bterm(const std::string
& term
);
33 void add_nterm(const std::string
& term
);
35 void add_query_string(const std::string
& prefix
, const std::string
& s
);
37 void parse_omegascript();
39 std::string
pretty_term(std::string term
);
41 class OmegaExpandDecider
: public Xapian::ExpandDecider
{
43 set
<string
> exclude_stems
;
45 OmegaExpandDecider(const Xapian::Database
& db
,
46 set
<string
> * querytermset
= NULL
);
47 bool operator()(const string
& term
) const;
50 std::string
html_escape(const std::string
&str
);
52 #endif // OMEGA_INCLUDED_QUERY_H