Changes between Version 23 and Version 24 of Event/2013/GSoC/TextSearch
- Timestamp:
- 07/28/13 12:51:04 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Event/2013/GSoC/TextSearch
v23 v24 71 71 * In onaccept() 72 72 {{{ 73 @staticmethod 74 def document_onaccept(form): 75 73 76 vars = form.vars 74 77 doc = vars.file # Where file is the name of the … … 94 97 95 98 }}} 99 * in ondelete(): 100 {{{ 101 @staticmethod 102 def document_ondelete(row): 103 104 db = current.db 105 table = db.doc_document # doc_document is the tablename 106 107 record = db(table.id == row.id).select(table.file, 108 limitby=(0, 1)).first() 109 110 document = json.dumps(dict(filename=record.file, 111 id=row.id, 112 )) 113 114 current.s3task.async("document_delete_index", 115 args = [document]) 116 117 return 118 119 }}} 96 120 97 121 ||= SMART Goal =||= Measure =||= Status =|| … … 106 130 || Implemented a transform() function to transform a __text query to __belong query || Successfully implemented with Error handling || Completed || 107 131 || Unit tests for all cases(solr un/available, query(), __call__() ) || Implemented the unit tests for s3resource || Almost Done || 132 || Generic Indexing onaccept() hook, can be integrated in any module || Implemented and tested on doc_document || Completed ||