Changeset View
Changeset View
Standalone View
Standalone View
src/lib/searchstore.cpp
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Line(s) | 299 | } else if (property == "tag") { | |||
---|---|---|---|---|---|
304 | } else if (term.comparator() == Term::Contains) { | 304 | } else if (term.comparator() == Term::Contains) { | ||
305 | const QByteArray prefix = "TA"; | 305 | const QByteArray prefix = "TA"; | ||
306 | EngineQuery q = constructEqualsQuery(prefix, value.toString()); | 306 | EngineQuery q = constructEqualsQuery(prefix, value.toString()); | ||
307 | return tr->postingIterator(q); | 307 | return tr->postingIterator(q); | ||
308 | } else { | 308 | } else { | ||
309 | Q_ASSERT(0); | 309 | Q_ASSERT(0); | ||
310 | return nullptr; | 310 | return nullptr; | ||
311 | } | 311 | } | ||
312 | } else if (property == "") { | ||||
313 | Term cterm(QStringLiteral("content"), term.value(), term.comparator()); | ||||
314 | Term fterm(QStringLiteral("filename"), term.value(), term.comparator()); | ||||
315 | return constructQuery(tr, Term{cterm, Term::Operation::Or, fterm}); | ||||
312 | } | 316 | } | ||
313 | 317 | | |||
314 | QByteArray prefix; | 318 | QByteArray prefix; | ||
315 | QVariant::Type valueType = QVariant::String; | 319 | QVariant::Type valueType = QVariant::String; | ||
316 | if (!property.isEmpty()) { | 320 | if (!property.isEmpty()) { | ||
317 | std::tie(prefix, valueType) = propertyInfo(property); | 321 | std::tie(prefix, valueType) = propertyInfo(property); | ||
318 | if (valueType == QVariant::Invalid) { | 322 | if (valueType == QVariant::Invalid) { | ||
319 | return nullptr; | 323 | return nullptr; | ||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |