hymloth / pyredise Goto Github PK
View Code? Open in Web Editor NEWA simple and fast search engine
A simple and fast search engine
import redis
from pyredise import corpus_handler
db = redis.Redis(host='localhost', port=6379, db=0)
cp = corpus_handler.CorpusHandler(db=db)
doc = {"id":"a uuid is an excellent candidate", "title":"How dummy", "content":"bla bla bla"}
cp.index( doc )
QH = query_handler.QueryHandler(db=db)
QH.process_query('dummy')
INITIAL QUERY: dummy
WITH FILTERS: set([])
STEMMED QUERY: dummi
In exec single query
RESULTS []
Traceback (most recent call last):
File "", line 1, in
File "/foxy/forum2_search/lib/python2.7/site-packages/pyredise/query_handler.py", line 99, in process_query
external_ids = self.resolve_external_ids([i[0] for i in res])
File "/foxy/forum2_search/lib/python2.7/site-packages/pyredise/index_base.py", line 131, in resolve_external_ids
return self.db.hmget(self._docid_map, doc_ids)
File "/foxy/forum2_search/lib/python2.7/site-packages/redis/client.py", line 1096, in hmget
return self.execute_command('HMGET', name, _args)
File "/foxy/forum2_search/lib/python2.7/site-packages/redis/client.py", line 280, in execute_command
return self.parse_response(connection, command_name, *_options)
File "/foxy/forum2_search/lib/python2.7/site-packages/redis/client.py", line 290, in parse_response
response = connection.read_response()
File "/foxy/forum2_search/lib/python2.7/site-packages/redis/connection.py", line 270, in read_response
raise response
redis.exceptions.ResponseError: wrong number of arguments for 'hmget' command
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.