def findDocuments(self, query): """Find all indexed documents matching the query""" words = WORDS_RGX.findall(normalizeText(query)) self._updateQueryStatistics(words) try: cursor = self._cnx.cursor() return Document.selectContaining(cursor, words) finally: cursor.close()
def findDocuments(self, query): """Find all indexed documents matching the query""" # TODO: order results using document_scores information words = WORDS_RGX.findall(normalizeText(unicode(query.words))) self._updateQueryStatistics(words) try: cursor = self._cnx.cursor() return Document.selectContaining(cursor, words, query.filetype, query.offset, self.searchInPrivate) finally: cursor.close()