in-process search-engine for python
Project description
hashedixsearch
hashedixsearch
is a lightweight in-process search engine for Python, with support for stemming, synonyms, custom token analyzers, and query match highlighting.
Usage
from hashedixsearch import HashedIXSearch
doc = 'find the needle in the haystack'
index = HashedIXSearch(synonyms={'search': 'find'})
index.add(doc_id=1, doc=doc)
results = index.query_batch(['search'])
for query, hits in results:
for hit in hits:
# <mark>find</mark> the needle in the haystack
markup = index.highlight(doc=doc, terms=hit['terms'])
Tests
To run the hashedixsearch
test suite:
$ python -m unittest
This library uses hashedindex for tokenization and indexing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hashedixsearch-1.0.6.tar.gz
(14.9 kB
view hashes)
Built Distribution
Close
Hashes for hashedixsearch-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 845448cf9fd51dd87443084c407002d0a78d241678643bdea9143e210f705ff0 |
|
MD5 | 5c8eed9b54c5462711fb5c0baf9d5c3b |
|
BLAKE2b-256 | 5ce47e5c01e38d223b685529ed93e4d1d3618d3e3611a8d21119f44e0b451e02 |