Skip to main content

Search Document by Field and Value.

Project description

Documentation Status https://travis-ci.org/MacHu-GWU/invsearch-project.svg?branch=master https://codecov.io/gh/MacHu-GWU/invsearch-project/branch/master/graph/badge.svg https://img.shields.io/pypi/v/invsearch.svg https://img.shields.io/pypi/l/invsearch.svg https://img.shields.io/pypi/pyversions/invsearch.svg https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Document-blue.svg https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Source_Code-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to invsearch Documentation

A fast document search engine allow search by field and value pair.

Example:

>>> from invsearch import InvIndex
>>> ii = InvIndex([
...     {"id": 1, "name": "Alice", "friends": [2, 3]},
...     {"id": 2, "name": "Bob", "age": 15, "friends": [1, 3]},
...     {"id": 3, "name": "Cathy", "age": None, "friends": [1, 2]},
...     {"id": 4, "name": "Bob", "age": None},
... ])
>>> ii.find_one(id=1)
{"id": 1, "name": "Alice", "friends": [2, 3]}
>>> ii.find(name="Bob")
[{"id": 2, "name": "Bob", "age": 15, "friends": [1, 3]}, {"id": 4, "name": "Bob", "age": None}]
>>> ii.by_id(id=1)
{"id": 1, "name": "Alice", "friends": [2, 3]}

Install

invsearch is released on PyPI, so all you need is:

$ pip install invsearch

To upgrade to latest version:

$ pip install --upgrade invsearch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invsearch-0.0.2.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

invsearch-0.0.2-py2.py3-none-any.whl (19.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page