Example #1
0
 def getQueryResults(self, query, onlyLocal=False, onlyDistant=False):
     """builds and returns Result' instances by searching in
     the temporary table built for <qid>
     """
     cursor = self._cnx.cursor()
     results = Result.selectWhere(cursor, query, onlyLocal, onlyDistant)
     cursor.close()
     return results
Example #2
0
 def getQueryResults(self, query, onlyLocal=False, onlyDistant=False):
     """builds and returns Result' instances by searching in
     the temporary table built for <qid>
     """
     cursor = self._cnx.cursor()
     results = Result.selectWhere(cursor, query, onlyLocal, onlyDistant)
     cursor.close()
     return results
Example #3
0
 def pushDocuments(self, qid, documents, provider):
     """push <documents> into the temporary table built for
     <qid>
     """
     cursor = self._cnx.cursor()
     try:
         for document in documents:
             res = Result.fromDocument(document, qid, provider)
             res.commit(cursor, update=False)
         cursor.close()
         self._cnx.commit()
     except:
         traceback.print_exc()
         self._cnx.rollback()
Example #4
0
 def pushDocuments(self, qid, documents, provider):
     """push <documents> into the temporary table built for
     <qid>
     """
     cursor = self._cnx.cursor()
     try:
         for document in documents:
             res = Result.fromDocument(document, qid, provider)
             res.commit(cursor, update=False)
         cursor.close()
         self._cnx.commit()
     except:
         traceback.print_exc()
         self._cnx.rollback()