基于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://codercto.com/soft/d/13266.html

Head First Mobile Web

Head First Mobile Web

Lyza Danger Gardner、Jason Grigsby / O'Reilly Media / 2011-12 / $ 50.84

Despite the huge number of mobile devices and apps in use today, your business still needs a website. You just need it to be mobile. Head First Mobile Web walks you through the process of making a con......一起来看看 《Head First Mobile Web》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

随机密码生成器
随机密码生成器

多种字符组合密码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具