Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/r/e/redis-search-py-HEAD/redis_search/query.py   redis-search-py(Download)
 
import util
from util import split_words, split_pinyin, utf8, mk_sets_key, mk_score_key, mk_condition_key, mk_complete_key
 
def query(name, text, offset=0, limit=10, sort_field='id', conditions=None):
    if conditions:
        for c in conditions:
            condition_keys.append(mk_condition_key(name, c, utf8(conditions[c])))
 
        # 将条件的 key 放入关键词搜索集合内,用于 sinterstore 搜索
    if conditions:
        for c in conditions:
            condition_keys.append(mk_condition_key(name, c, utf8(conditions[c])))
 
    # 按词语搜索

src/r/e/redis-search-py-HEAD/redis_search/index.py   redis-search-py(Download)
 
import util
from util import split_words, split_pinyin, utf8, mk_sets_key, mk_score_key, mk_condition_key, mk_complete_key
 
class index(object):
        # 将目前的编号保存到条件(conditions)字段所创立的索引上面
        for field in self.condition_fields:
            pipe.sadd(mk_condition_key(self.name, field, utf8(data[field])), self.id)
 
        # commit