djdb/search.py
def fetch_keys_for_one_term(term, entity_kind=None, field=None, end=None):
    """Find entity keys matching a single search term.

    Args:
      term: A unicode string containing a single search term.
      entity_kind: An optional string.  If given, the returned keys are
        restricted to entities of that kind.
      field: An optional string.  If given, the returned keys are restricted
        to matches for that particular field.
      end: An optional string. If given, the returned keys are restricted to
        matched within a range from term to end.

    Returns:
      A set of (db.Key, matching field) pairs.
    """
    query = models.SearchMatches.all()
    if entity_kind:
        query.filter("entity_kind =", entity_kind)
    if field:
        query.filter("field =", field)
    if end:
        query.filter("term >=", term)
        query.filter("term <", end + u"\uffff")
    else:
        query.filter("term =", term)
    return _fetch_all(query)
Find entity keys matching a single search term.

    Args:
      term: A unicode string containing a single search term.
      entity_kind: An optional string.  If given, the returned keys are
        restricted to entities of that kind.
      field: An optional string.  If given, the returned keys are restricted
        to matches for that particular field.
      end: An optional string. If given, the returned keys are restricted to
        matched within a range from term to end.

    Returns:
      A set of (db.Key, matching field) pairs.
    
Find entity keys matching a single search term.
Find entity keys matching a single search term .
def fetch_keys_for_one_term(term, entity_kind=None, field=None, end=None):
    query = models.SearchMatches.all()
    if entity_kind:
        query.filter("entity_kind =", entity_kind)
    if field:
        query.filter("field =", field)
    if end:
        query.filter("term >=", term)
        query.filter("term <", end + u"\uffff")
    else:
        query.filter("term =", term)
    return _fetch_all(query)
def fetch_keys_for_one_term ( term , entity_kind = None , field = None , end = None ) : query = models . SearchMatches . all ( ) if entity_kind : query . filter ( "entity_kind =" , entity_kind ) if field : query . filter ( "field =" , field ) if end : query . filter ( "term >=" , term ) query . filter ( "term <" , end + u"\uffff" ) else : query . filter ( "term =" , term ) return _fetch_all ( query )
Find entity keys matching a single search term.
Find entity keys matching a single search term .
"""Find entity keys matching a single search term.

    Args:
      term: A unicode string containing a single search term.
      entity_kind: An optional string.  If given, the returned keys are
        restricted to entities of that kind.
      field: An optional string.  If given, the returned keys are restricted
        to matches for that particular field.
      end: An optional string. If given, the returned keys are restricted to
        matched within a range from term to end.

    Returns:
      A set of (db.Key, matching field) pairs.
    """
A set of (db.Key, matching field) pairs.
A set of ( db . Key matching field ) pairs .
term
A unicode string containing a single search term.
A unicode string containing a single search term .
entity_kind
An optional string.  If given, the returned keys are
restricted to entities of that kind.
An optional string . If given the returned keys are restricted to entities of that kind .
field
An optional string.  If given, the returned keys are restricted
to matches for that particular field.
An optional string . If given the returned keys are restricted to matches for that particular field .
end
An optional string. If given, the returned keys are restricted to
matched within a range from term to end.
An optional string . If given the returned keys are restricted to matched within a range from term to end .