djdb/search.py
def update_key(self, key, field, old_text, text):
        """Update index content associated with a datastore key.
        
        Args:
          key: A db.Key instance.
          field: A field identifier string.
          old_text: A unicode string, the old text, to be updated with text.
          text: A unicode string, the content to be indexed.
        """
        # Remove old terms.
        for term in set(explode(old_text)):
            sm = self._get_matches(key.kind(), field, term, key)
            if key in sm.matches:
                sm.matches.remove(key)
            
        # Add new terms.
        if text is not None:
            self.add_key(key, field, text)
Update index content associated with a datastore key.
        
        Args:
          key: A db.Key instance.
          field: A field identifier string.
          old_text: A unicode string, the old text, to be updated with text.
          text: A unicode string, the content to be indexed.
        
Update index content associated with a datastore key.
Update index content associated with a datastore key .
def update_key(self, key, field, old_text, text):
        for term in set(explode(old_text)):
            sm = self._get_matches(key.kind(), field, term, key)
            if key in sm.matches:
                sm.matches.remove(key)
        if text is not None:
            self.add_key(key, field, text)
def update_key ( self , key , field , old_text , text ) : for term in set ( explode ( old_text ) ) : sm = self . _get_matches ( key . kind ( ) , field , term , key ) if key in sm . matches : sm . matches . remove ( key ) if text is not None : self . add_key ( key , field , text )
Update index content associated with a datastore key.
Update index content associated with a datastore key .
"""Update index content associated with a datastore key.
        
        Args:
          key: A db.Key instance.
          field: A field identifier string.
          old_text: A unicode string, the old text, to be updated with text.
          text: A unicode string, the content to be indexed.
        """ # Remove old terms. # Add new terms.
self
key
A db.Key instance.
A db . Key instance .
field
A field identifier string.
A field identifier string .
old_text
A unicode string, the old text, to be updated with text.
A unicode string the old text to be updated with text .
text
A unicode string, the content to be indexed.
A unicode string the content to be indexed .