Your IP : 172.28.240.42


Current Path : /usr/share/apt-xapian-index/plugins/
Upload File :
Current File : //usr/share/apt-xapian-index/plugins/descriptions.pyc

ó
b3Rc@sŒy"ddlZddlZeZWnek
r;eZnXddlZddlZddlZddl	Zddd„ƒYZ
d„ZdS(iÿÿÿÿNtDescriptionscBsSeZd„Zd„Zdd„Zd„Zd„ZesHd„Znd„Z	RS(cCs´tdddtdddddddd	d
dƒgƒ}tsC|SttdƒsV|Stjjd
ƒ}tjj	|ƒs~|Std|ddƒg|d<tjj
|ƒ|d<|S(sû
        Return general information about the plugin.

        The information returned is a dict with various keywords:

         timestamp (required)
           the last modified timestamp of this data source.  This will be used
           to see if we need to update the database or not.  A timestamp of 0
           means that this data source is either missing or always up to date.
         values (optional)
           an array of dicts { name: name, desc: description }, one for every
           numeric value indexed by this data source.

        Note that this method can be called before init.  The idea is that, if
        the timestamp shows that this plugin is currently not needed, then the
        long initialisation can just be skipped.
        t	timestampitprefixestidxtZtqpttypetdescsStemmed forms of keywordstldescsdThis contains the stemmed forms of keywords as generated by TermGenerator and matched by QueryParsertconfigsDir::Cache::pkgcachetpaths	APT indextsourcesN(tdicttNonetHAS_APTthasattrtapt_pkgR	t	find_filetosR
texiststgetmtime(tselftrestfname((s3/usr/share/apt-xapian-index/plugins/descriptions.pytinfoscCs8tjdƒ|_tjƒ|_|jj|jƒdS(s5
        If needed, perform long initialisation tasks here.

        info is a dictionary with useful information.  Currently it contains
        the following values:

          "values": a dict mapping index mnemonics to index numbers

        The progress indicator can be used to report progress.
        tenglishN(txapiantStemtstemmert
TermGeneratortindexertset_stemmer(RRtprogress((s3/usr/share/apt-xapian-index/plugins/descriptions.pytinit/scKs9|dk	r5|jjtjjƒ|jj|ƒndS(s²
        Receive extra parameters from the indexer.

        This may be called more than once, but after init().

        We are using this to get the database instance
        N(R
Rt	set_flagsRRt
FLAG_SPELLINGtset_database(Rtdbtkw((s3/usr/share/apt-xapian-index/plugins/descriptions.pytsend_extra_info>scCstddddddƒS(s+
        Return documentation information for this data source.

        The documentation information is a dictionary with these keys:
          name: the name for this data source
          shortDesc: a short description
          fullDoc: the full description as a chapter in ReST format
        tnamesPackage descriptionst	shortDescsJterms extracted from the package descriptions using Xapian's TermGeneratortfullDocs
            The Descriptions data source simply uses Xapian's TermGenerator to
            tokenise and index the package descriptions.

            Currently this creates normal terms as well as stemmed terms
            prefixed with ``Z``.
            (R(R((s3/usr/share/apt-xapian-index/plugins/descriptions.pytdocJs	cCsR|jj|ƒ|jj|jƒ|j}|dk	rN|jj|jƒndS(sÂ
        Update the document with the information from this data source.

        document  is the document to update
        pkg       is the python-apt Package object for this package
        N(Rtset_documenttindex_text_without_positionsR(t	candidateR
traw_description(Rtdocumenttpkgtversion((s3/usr/share/apt-xapian-index/plugins/descriptions.pytindex_s
	cCsdS(N((RR0R1((s3/usr/share/apt-xapian-index/plugins/descriptions.pyR3nscCs‰|jj|ƒ|jj|dƒd|krG|jj|dƒn>x;|jƒD]-}|jdƒrT|jj||ƒPqTqTWdS(s7
        Update the document with the information from this data source.

        This is alternative to index, and it is used when indexing with package
        data taken from a custom Packages file.

        document  is the document to update
        pkg       is the Deb822 object for this package
        tPackagetDescriptionsDescription-N(RR,R-tkeyst
startswith(RR0R1tk((s3/usr/share/apt-xapian-index/plugins/descriptions.pytindexDeb822qs
N(
t__name__t
__module__RR!R
R'R+R3RR9(((s3/usr/share/apt-xapian-index/plugins/descriptions.pyRs	#			cKstƒS(s.
    Create and return the plugin object.
    (R(R&((s3/usr/share/apt-xapian-index/plugins/descriptions.pyR!‰s((taptRtTrueRtImportErrortFalseRtreRtos.pathRR!(((s3/usr/share/apt-xapian-index/plugins/descriptions.pyt<module>s


~