|
a/src/rcldb/rclquery.cpp |
|
b/src/rcldb/rclquery.cpp |
|
... |
|
... |
201 |
m_nq->xenquire->set_collapse_key(Rcl::VALUE_MD5);
|
201 |
m_nq->xenquire->set_collapse_key(Rcl::VALUE_MD5);
|
202 |
} else {
|
202 |
} else {
|
203 |
m_nq->xenquire->set_collapse_key(Xapian::BAD_VALUENO);
|
203 |
m_nq->xenquire->set_collapse_key(Xapian::BAD_VALUENO);
|
204 |
}
|
204 |
}
|
205 |
m_nq->xenquire->set_docid_order(Xapian::Enquire::DONT_CARE);
|
205 |
m_nq->xenquire->set_docid_order(Xapian::Enquire::DONT_CARE);
|
206 |
if (!m_sortField.empty()) {
|
206 |
if (!m_sortField.empty() &&
|
|
|
207 |
stringlowercmp("relevancyrating", m_sortField)) {
|
207 |
if (m_sorter) {
|
208 |
if (m_sorter) {
|
208 |
delete (QSorter*)m_sorter;
|
209 |
delete (QSorter*)m_sorter;
|
209 |
m_sorter = 0;
|
210 |
m_sorter = 0;
|
210 |
}
|
211 |
}
|
211 |
m_sorter = new QSorter(m_sortField);
|
212 |
m_sorter = new QSorter(m_sortField);
|
212 |
// It really seems there is a xapian bug about sort order, we
|
213 |
// It really seems there is a xapian bug about sort order, we
|
213 |
// invert here.
|
214 |
// invert here.
|
214 |
m_nq->xenquire->set_sort_by_key((QSorter*)m_sorter,
|
215 |
m_nq->xenquire->set_sort_by_key((QSorter*)m_sorter,
|
215 |
!m_sortAscending);
|
216 |
!m_sortAscending);
|
216 |
}
|
217 |
}
|
217 |
m_nq->xenquire->set_query(m_nq->xquery);
|
218 |
m_nq->xenquire->set_query(m_nq->xquery);
|
218 |
m_nq->xmset = Xapian::MSet();
|
219 |
m_nq->xmset = Xapian::MSet();
|
219 |
// Get the query description and trim the "Xapian::Query"
|
220 |
// Get the query description and trim the "Xapian::Query"
|
220 |
d = m_nq->xquery.get_description();
|
221 |
d = m_nq->xquery.get_description();
|