libept
|
00001 #ifndef EPT_TEXTSEARCH_TEXTSEARCH_H 00002 #define EPT_TEXTSEARCH_TEXTSEARCH_H 00003 00009 /* 00010 * Copyright (C) 2007 Enrico Zini <enrico@debian.org> 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 */ 00026 00027 #include <xapian.h> 00028 #include <string> 00029 00030 namespace ept { 00031 00046 namespace axi { 00047 00048 // Allocate value indexes for known values 00049 const Xapian::valueno VAL_APT_INSTALLED_SIZE = 1; 00050 const Xapian::valueno VAL_APT_PACKAGE_SIZE = 2; 00051 const Xapian::valueno VAL_POPCON = 10; 00052 const Xapian::valueno VAL_ITERATING_RATING = 20; 00053 const Xapian::valueno VAL_ITERATING_FUNCTIONALITY = 21; 00054 const Xapian::valueno VAL_ITERATING_USABILITY = 22; 00055 const Xapian::valueno VAL_ITERATING_SECURITY = 23; 00056 const Xapian::valueno VAL_ITERATING_PERFORMANCE = 24; 00057 const Xapian::valueno VAL_ITERATING_QUALITY = 25; 00058 const Xapian::valueno VAL_ITERATING_SUPPORT = 26; 00059 const Xapian::valueno VAL_ITERATING_ADOPTION = 27; 00060 // If you need to index a value and cannot edit this file, feel free to use any 00061 // value starting from 1000000 00062 00064 std::string path_dir(); 00065 00067 std::string path_db(); 00068 00070 time_t timestamp(); 00071 00072 00077 class OverrideIndexDir 00078 { 00079 std::string old; 00080 public: 00081 OverrideIndexDir(const std::string& path); 00082 ~OverrideIndexDir(); 00083 }; 00084 00085 } 00086 } 00087 00088 // vim:set ts=4 sw=4: 00089 #endif