~ubuntu-branches/ubuntu/intrepid/apt-xapian-index/intrepid

« back to all changes in this revision

Viewing changes to plugins/descriptions.py

  • Committer: Bazaar Package Importer
  • Author(s): Enrico Zini
  • Date: 2008-02-19 11:19:08 UTC
  • Revision ID: james.westby@ubuntu.com-20080219111908-mq6rug29v32hlqp0
Tags: 0.6
Added --pkgfile option to index arbitrary Package files instead of the APT
cache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        self.indexer.index_text_without_positions(pkg.name)
75
75
        self.indexer.index_text_without_positions(pkg.rawDescription)
76
76
 
 
77
    def indexDeb822(self, document, pkg):
 
78
        """
 
79
        Update the document with the information from this data source.
 
80
 
 
81
        This is alternative to index, and it is used when indexing with package
 
82
        data taken from a custom Packages file.
 
83
 
 
84
        document  is the document to update
 
85
        pkg       is the Deb822 object for this package
 
86
        """
 
87
        self.indexer.set_document(document)
 
88
 
 
89
        # Index the record
 
90
        self.indexer.index_text_without_positions(pkg["Package"])
 
91
        self.indexer.index_text_without_positions(pkg["Description"])
 
92
 
77
93
def init():
78
94
    """
79
95
    Create and return the plugin object.