Changes between Version 23 and Version 24 of Event/2013/GSoC/TextSearch


Ignore:
Timestamp:
07/28/13 12:51:04 (12 years ago)
Author:
Vishrut Mehta
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Event/2013/GSoC/TextSearch

    v23 v24  
    7171 * In onaccept()
    7272{{{
     73    @staticmethod
     74    def document_onaccept(form):
     75
    7376        vars = form.vars
    7477        doc = vars.file # Where file is the name of the
     
    9497
    9598}}}
     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}}}
    96120
    97121||= SMART Goal =||= Measure =||= Status =||
     
    106130|| Implemented a transform() function to transform a __text query to __belong query || Successfully implemented with Error handling || Completed ||
    107131|| 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 ||