Stop talking about "probabilistic query" in code
[xapian.git] / xapian-applications / omega / query.h
bloba3f59e159324908e19005476f43778f3e88f1ca0
1 /** @file query.h
2 * @brief: Omega functions for running queries, etc.
3 */
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
24 #include <xapian.h>
26 #include <set>
27 #include <string>
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 {
42 Xapian::Database db;
43 set<string> exclude_stems;
44 public:
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