#3058 HIGH Trial-3: Journal default indexing policy

Zarro Boogs per Child bugtracker at laptop.org
Thu Aug 30 06:25:17 EDT 2007


#3058: Journal default indexing policy
-------------------------------+--------------------------------------------
  Reporter:  kimquirk          |       Owner:  tomeu  
      Type:  defect            |      Status:  new    
  Priority:  high              |   Milestone:  Trial-3
 Component:  journal-activity  |     Version:         
Resolution:                    |    Keywords:         
  Verified:  0                 |  
-------------------------------+--------------------------------------------
Comment (by tomeu):

 What if Activities like Write add a metadata property say 'content' or
 'summary' with the first 5000 chars that gets indexed synchronously along
 with the title and the rest of the properties?

 I think this can be fast enough to be done synchronously when checking in
 the entry, although we can tune the max length of the property based on
 real observation.

 In this way, we don't have async content extraction and indexing but we
 retain some capability of referring to entries by their content.

 The modification required to Write is something like this:

 {{{
 diff --git a/AbiWordActivity.py b/AbiWordActivity.py
 index 9130175..be4249a 100644
 --- a/AbiWordActivity.py
 +++ b/AbiWordActivity.py
 @@ -312,6 +312,7 @@ class AbiWordActivity (Activity):
          logging.debug('AbiWordActivity.write_file')

          self.metadata['mime_type'] =
 'application/vnd.oasis.opendocument.text'
 +        self.metadata['summary'] =
 self.abiword_canvas.get_content(".txt")[:5000]
          f = open(file_path, 'w')
          try:
              logger.debug('Writing content as .odt')
 }}}

-- 
Ticket URL: <https://dev.laptop.org/ticket/3058#comment:1>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list