Skip to content
seecrPublic

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

70 Commits

Folders and files

Repository files navigation

sil – Seecr Indexing Lib

Tests PyPI

A search index for Python applications, on tantivy: an index profile in Python, a forgiving query language, sorting on several fields, drilldown (counts per value), suggestions while typing, and commits on a timer. One index is one directory; no server, no JVM.

from sil.index import Index
from sil.indexfield import IndexField
from sil.indexprofile import IndexProfile

index = Index(path, IndexProfile([
    IndexField.unqualified("all"),
    IndexField.untokenized("genre", drilldown=True),
    IndexField.int("year", sortable=True),
]), immediate_commit=True)

index.add_record("book-1", {"all": "Dune Frank Herbert", "genre": "sf", "year": 1965})
index.search_query("dune", sort="year", drilldown=[{"name": "genre"}])
# {"count": 1, "docs": [{"__id__": "book-1"}], "drilldown": {"genre": [("sf", 1)]}}

Install with pip install seecr-sil (the package is sil). It needs Python 3.11 or newer and tantivy.

The reference describes everything; the changelog says what changed. sil was built on Lucene (through JCC) up to 2.x; 3.0 replaced it with tantivy.

MIT licensed, see LICENSE. By Seecr.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages