基于Redis的Python搜索引擎 pyredise

码农软件 · 软件分类 · 搜索引擎 · 2019-08-27 09:29:39

软件介绍

pyredise 是一个基于 Python 和 Redis 的简单快速的搜索引擎。

示例代码:

import query_handler
import redis
db = = redis.Redis(host='localhost', port=6379, db=0)
QH = query_handler.QueryHandler(db=db)

# issue some queries, returning a list of tuples such as [(doc_id1, score1), (doc_id2, score2), ...]
print QH.process_query("google security data /pure_tfidf") # ranking only according to tf-idf
print QH.process_query("google security data /complete") # complete
print QH.process_query("google security data /title_only") # search in titles

本文地址:https://www.codercto.com/soft/d/13266.html

Realm of Racket

Realm of Racket

Matthias Felleisen、Conrad Barski M.D.、David Van Horn、Eight Students Northeastern University of / No Starch Press / 2013-6-25 / USD 39.95

Racket is the noble descendant of Lisp, a programming language renowned for its elegance and power. But while Racket retains the functional goodness of Lisp that makes programming purists drool, it wa......一起来看看 《Realm of Racket》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码