Welcome to Librorum’s documentation!

Contents:

class librorum.Librorum(redis_conn, **kwargs)

A search engine for phrase autocompletition and searching engine based on Redis

add_item(item)

Add new item to database. Item excepted as dict type. Steps: 1. Save the item to database 2. Word segementation by blank and Jieba for Chinese 3. Save the indexes to indexbase

flush()

Clean all the keys used by Librorum

index(term, uid, score=1)

Index term and uid with base score

retrieve(word, limit=0, offset=0, **kwargs)

Get uid list by word, args are the same as self.search

search(term, **kwargs)

Get the result from database, accepted args are: term: word for searching limit: how many results you need offset: the offset of searching result