[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/nepomuk/query
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-02-16 10:50:10
Message-ID: 1266317410.102679.27778.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1090918 by trueg:

Do not use crappy inference for file/folder type. There is no need and it slows down \
searches a lot.

 M  +5 -1      query.cpp  


--- trunk/KDE/kdelibs/nepomuk/query/query.cpp #1090917:1090918
@@ -288,7 +288,11 @@
 
     // restrict to files if we are a file query
     if( d->m_isFileQuery ) {
-        term = AndTerm( term, OrTerm( ResourceTypeTerm( \
Vocabulary::NFO::FileDataObject() ), ResourceTypeTerm( Vocabulary::NFO::Folder() ) ) \
); +        //
+        // we do not use ResourceTypeTerm since we do not want to use crappy \
inference every time. All files have nfo:FileDataObject type anyway +        //
+        term = AndTerm( term, OrTerm( ComparisonTerm( \
Soprano::Vocabulary::RDF::type(), ResourceTerm(Vocabulary::NFO::FileDataObject()), \
ComparisonTerm::Equal ), +                                      ComparisonTerm( \
Soprano::Vocabulary::RDF::type(), ResourceTerm(Vocabulary::NFO::Folder()), \
ComparisonTerm::Equal ) ) );  }
 
     // actually build the SPARQL query string


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic