avoid re-running a setQuery that already failed
This commit is contained in:
parent
426481e3af
commit
39456d8135
@ -34,7 +34,8 @@ DocSequenceDb::DocSequenceDb(RefCntr<Rcl::Query> q, const string &t,
|
||||
m_queryReplaceAbstract(false),
|
||||
m_isFiltered(false),
|
||||
m_isSorted(false),
|
||||
m_needSetQuery(false)
|
||||
m_needSetQuery(false),
|
||||
m_lastSQStatus(true)
|
||||
{
|
||||
}
|
||||
|
||||
@ -227,12 +228,14 @@ bool DocSequenceDb::setQuery()
|
||||
{
|
||||
if (!m_needSetQuery)
|
||||
return true;
|
||||
|
||||
m_needSetQuery = false;
|
||||
m_rescnt = -1;
|
||||
m_needSetQuery = !m_q->setQuery(m_fsdata);
|
||||
if (m_needSetQuery) {
|
||||
m_lastSQStatus = m_q->setQuery(m_fsdata);
|
||||
if (!m_lastSQStatus) {
|
||||
m_reason = m_q->getReason();
|
||||
LOGERR(("DocSequenceDb::setQuery: rclquery::setQuery failed: %s\n",
|
||||
m_reason.c_str()));
|
||||
}
|
||||
return !m_needSetQuery;
|
||||
return m_lastSQStatus;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ class DocSequenceDb : public DocSequence {
|
||||
bool m_isFiltered;
|
||||
bool m_isSorted;
|
||||
bool m_needSetQuery; // search data changed, need to reapply before fetch
|
||||
|
||||
bool m_lastSQStatus;
|
||||
bool setQuery();
|
||||
};
|
||||
|
||||
|
||||
@ -109,7 +109,8 @@ static const char *maxXapClauseMsg =
|
||||
"Maximum Xapian query size exceeded. Increase maxXapianClauses "
|
||||
"in the configuration. ";
|
||||
static const char *maxXapClauseCaseDiacMsg =
|
||||
"Or try to use case (C) or diacritics (D) sensitivity qualifiers."
|
||||
"Or try to use case (C) or diacritics (D) sensitivity qualifiers, or less "
|
||||
"wildcards ?"
|
||||
;
|
||||
|
||||
bool SearchData::clausesToQuery(Rcl::Db &db, SClType tp,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user