Switch to unified view

a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp
...
...
253
        } else {
253
        } else {
254
            xq = Xapian::Query(Xapian::Query::OP_FILTER, xq, dq);
254
            xq = Xapian::Query(Xapian::Query::OP_FILTER, xq, dq);
255
        }
255
        }
256
    }
256
    }
257
257
258
259
    if (m_minSize != size_t(-1) || m_maxSize != size_t(-1)) {
260
        Xapian::Query sq;
261
  char min[50], max[50];
262
  sprintf(min, "%lld", (long long)m_minSize);
263
  sprintf(max, "%lld", (long long)m_maxSize);
264
  if (m_minSize == size_t(-1)) {
265
      string value(max);
266
      leftzeropad(value, 12);
267
      sq = Xapian::Query(Xapian::Query::OP_VALUE_LE, VALUE_SIZE, value);
268
  } else if (m_maxSize == size_t(-1)) {
269
      string value(min);
270
      leftzeropad(value, 12);
271
      sq = Xapian::Query(Xapian::Query::OP_VALUE_GE, VALUE_SIZE, value);
272
  } else {
273
      string minvalue(min);
274
      leftzeropad(minvalue, 12);
275
      string maxvalue(max);
276
      leftzeropad(maxvalue, 12);
277
      sq = Xapian::Query(Xapian::Query::OP_VALUE_RANGE, VALUE_SIZE, 
278
                 minvalue, maxvalue);
279
  }
280
      
281
        // If no probabilistic query is provided then promote the
282
        // filter to be THE query instead of filtering an empty query.
283
        if (xq.empty()) {
284
            LOGINFO(("Db::toNativeQuery: proba query is empty\n"));
285
            xq = sq;
286
        } else {
287
            xq = Xapian::Query(Xapian::Query::OP_FILTER, xq, sq);
288
        }
289
    }
290
258
    // Add the file type filtering clause if any
291
    // Add the file type filtering clause if any
259
    if (!m_filetypes.empty()) {
292
    if (!m_filetypes.empty()) {
260
    expandFileTypes(db.getConf(), m_filetypes);
293
    expandFileTypes(db.getConf(), m_filetypes);
261
        
294
        
262
    Xapian::Query tq;
295
    Xapian::Query tq;
...
...
450
    m_topdir.erase();
483
    m_topdir.erase();
451
    m_topdirexcl = false;
484
    m_topdirexcl = false;
452
    m_description.erase();
485
    m_description.erase();
453
    m_reason.erase();
486
    m_reason.erase();
454
    m_haveDates = false;
487
    m_haveDates = false;
488
    m_minSize = size_t(-1);
489
    m_maxSize = size_t(-1);
455
}
490
}
456
491
457
// Am I a file name only search ? This is to turn off term highlighting
492
// Am I a file name only search ? This is to turn off term highlighting
458
bool SearchData::fileNameOnly() 
493
bool SearchData::fileNameOnly() 
459
{
494
{