Fixed some "unused xxx" warnings + include autoconfig
This commit is contained in:
@@ -173,7 +173,6 @@ double Query::Native::qualityTerms(Xapian::docid docid,
|
||||
map<string, vector<string> > byRoot;
|
||||
for (vector<string>::const_iterator qit = terms.begin();
|
||||
qit != terms.end(); qit++) {
|
||||
bool found = false;
|
||||
map<string, string>::const_iterator eit = hld.terms.find(*qit);
|
||||
if (eit != hld.terms.end()) {
|
||||
byRoot[eit->second].push_back(*qit);
|
||||
@@ -280,7 +279,6 @@ int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
|
||||
|
||||
// We try to use a page which matches the "best" term. Get a sorted list
|
||||
multimap<double, vector<string> > byQ;
|
||||
double totalweight = qualityTerms(docid, terms, byQ);
|
||||
|
||||
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
||||
mit != byQ.rend(); mit++) {
|
||||
|
||||
@@ -1501,13 +1501,11 @@ bool Db::addOrUpdate(const string &udi, const string &parent_udi, Doc &doc)
|
||||
// document. This is then not indexed, but part of the doc data so
|
||||
// that we can return it to a query without having to decode the
|
||||
// original file.
|
||||
bool syntabs = false;
|
||||
// Note that the map accesses by operator[] create empty entries if they
|
||||
// don't exist yet.
|
||||
string& absref = doc.meta[Doc::keyabs];
|
||||
trimstring(absref, " \t\r\n");
|
||||
if (absref.empty()) {
|
||||
syntabs = true;
|
||||
if (!doc.text.empty())
|
||||
absref = cstr_syntAbs +
|
||||
neutchars(truncate_to_word(doc.text, m_idxAbsTruncLen),
|
||||
|
||||
@@ -132,18 +132,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** Add prefix to all strings in list.
|
||||
* @param prefix already wrapped prefix
|
||||
*/
|
||||
static void addPrefix(vector<TermMatchEntry>& terms, const string& prefix)
|
||||
{
|
||||
if (prefix.empty())
|
||||
return;
|
||||
for (vector<TermMatchEntry>::iterator it = terms.begin();
|
||||
it != terms.end(); it++)
|
||||
it->term.insert(0, prefix);
|
||||
}
|
||||
|
||||
static const char *tmtptostr(int typ)
|
||||
{
|
||||
switch (typ) {
|
||||
|
||||
Reference in New Issue
Block a user