(self, fieldname, text)
Returns the first ID in the posting list for the given term. This
        may be optimized in certain backends.
Returns the first ID in the posting list for the given term. This
        may be optimized in certain backends.
Returns the first ID in the posting list for the given term . This may be optimized in certain backends .
def first_id(self, fieldname, text):
        """Returns the first ID in the posting list for the given term. This
        may be optimized in certain backends.
        """

        text = self._text_to_bytes(fieldname, text)
        p = self.postings(fieldname, text)
        if p.is_active():
            return p.id()
        raise TermNotFound((fieldname, text))
def first_id ( self , fieldname , text ) : text = self . _text_to_bytes ( fieldname , text ) p = self . postings ( fieldname , text ) if p . is_active ( ) : return p . id ( ) raise TermNotFound ( ( fieldname , text ) )