Commit 328fbfd8 authored by Vishesh Handa's avatar Vishesh Handa
Browse files

QueryLib: Remove unnecessary terms in file queries

When limiting the search for files, one doesn't need to explicitly
filter the results by OR ( file, folder ). One can just limit it to
nfo:FileDataObjects. All folders are always given the type of
parent 0d41e408
......@@ -420,7 +420,7 @@ QString Nepomuk2::Query::Query::toSparqlQuery( SparqlFlags sparqlFlags ) const
else if( d->m_fileMode == FileQuery::QueryFolders )
fileModeTerm = AndTerm( folderTerm, NegationTerm::negateTerm( fileTerm ) );
fileModeTerm = OrTerm( fileTerm, folderTerm );
fileModeTerm = fileTerm;
term = AndTerm( term, fileModeTerm, d->createFolderFilter() );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment