From 9170c841d4e66b18d1aee3cd701f6127654d7998 Mon Sep 17 00:00:00 2001 From: James <37276661+capjamesg@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:31:27 +0100 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index b4367de..4738159 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,24 @@ To install this project, run: pip install git+https://github.com/capjamesg/jamesql ``` +## Quickstart + +Here is a quickstart with a string-based query: + +``` +from jamesql import JameSQL + +index = JameSQL.load() + +index.add({"title": "tolerate it", "lyric": "Use my best colors for your portrait"}) + +# results should return in < 1ms, whether you have one or 1k documents +results = index.string_query_search("title:'tolerate it' colors") + +print(results) +# {'documents': [{'title': 'tolerate it', 'lyric': 'Use my best colors for your portrait' ...}] +``` + ## Usage ### Create a database