From 096d14f20f4dc39d20d35d605ca755b66bd48cf9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 1 May 2016 16:22:55 +0200 Subject: Account filter for resources and contains comparator in query --- common/typeindex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/typeindex.cpp') diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 1321469..fca083c 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp @@ -143,7 +143,7 @@ ResultSet TypeIndex::query(const Sink::Query &query, QSet &appliedFi for (auto it = mSortedProperties.constBegin(); it != mSortedProperties.constEnd(); it++) { if (query.propertyFilter.contains(it.key()) && query.sortProperty == it.value()) { Index index(indexName(it.key(), it.value()), transaction); - const auto lookupKey = getByteArray(query.propertyFilter.value(it.key())); + const auto lookupKey = getByteArray(query.propertyFilter.value(it.key()).value); Trace() << "looking for " << lookupKey; index.lookup(lookupKey, [&](const QByteArray &value) { keys << value; }, [it](const Index::Error &error) { Warning() << "Error in index: " << error.message << it.key() << it.value(); }, true); @@ -156,7 +156,7 @@ ResultSet TypeIndex::query(const Sink::Query &query, QSet &appliedFi for (const auto &property : mProperties) { if (query.propertyFilter.contains(property)) { Index index(indexName(property), transaction); - const auto lookupKey = getByteArray(query.propertyFilter.value(property)); + const auto lookupKey = getByteArray(query.propertyFilter.value(property).value); index.lookup( lookupKey, [&](const QByteArray &value) { keys << value; }, [property](const Index::Error &error) { Warning() << "Error in index: " << error.message << property; }); appliedFilters << property; -- cgit v1.2.3