def search_in_index(self, id_book, text, dict_perf, dict_field, limit): from Asmaa.asm_indexer import SearchIndexed search_in_indexed = SearchIndexed() filebook = self.db_list.file_book(id_book) db = bookDB(filebook, id_book) results = search_in_indexed.search_in_book(id_book, text, dict_perf, dict_field, limit) print len(results) for a in results: print db.get_text_body(a["page"])[3], db.get_text_body(a["page"])[4]
def search_in_index(self, id_book, text, dict_perf, dict_field, limit): from Asmaa.asm_indexer import SearchIndexed search_in_indexed = SearchIndexed() filebook = self.db_list.file_book(id_book) db = bookDB(filebook, id_book) results = search_in_indexed.search_in_book(id_book, text, dict_perf, dict_field, limit)