JameSQL - это NoSQL база данных на Python, работающая в оперативной памяти. Она поддерживает создание пользовательских алгоритмов ранжирования и обеспечивает сверхбыстрый полнотекстовый поиск по тысячам документов с несколькими полями (менее 1 мс).
from jamesql import JameSQL
index = JameSQL.load()
index.add({"title": "tolerate it", "lyric": "Use my best colors for your portrait"})
# Результаты возвращаются менее чем за 1 мс, независимо от количества документов
results = index.string_query_search("title:'tolerate it' colors")
print(results)
# {'documents': [{'title': 'tolerate it', 'lyric': 'Use my best colors for your portrait' ...}]
#JameSQL #NoSQL #Python #FullTextSearch #Database #InMemoryDatabase
https://github.com/capjamesg/jamesql
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - capjamesg/jamesql: An in-memory NoSQL database implemented in Python.
An in-memory NoSQL database implemented in Python. - capjamesg/jamesql
1⚡3🔥3👍2
django-hawkeye — это Django‑надстройка для полнотекстового поиска по BM25 прямо в PostgreSQL 17+ через расширение
pg_textsearch, лёгкая альтернатива Elasticsearch.BM25Searchable и BM25Index, дальше Article.search("django tutorial") как обычный QuerySet.pip install django-hawkeye
# установить pg_textsearch на сервере PostgreSQL 17+
git clone https://github.com/timescale/pg_textsearch.git
cd pg_textsearch
make && make install
from django.db import models
from django_hawkeye import BM25Index, BM25Searchable
class Article(BM25Searchable, models.Model):
title = models.CharField(max_length=255)
content = models.TextField()
class Meta:
indexes = [
BM25Index(fields=["content"], name="article_bm25_idx"),
]
#django #postgresql #fulltextsearch #bm25 #elasticsearch #rag #python
https://github.com/FarhanAliRaza/django-hawkeye
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - FarhanAliRaza/django-hawkeye: Django BM25 full-text search using PostgreSQL - a lightweight Elasticsearch alternative
Django BM25 full-text search using PostgreSQL - a lightweight Elasticsearch alternative - FarhanAliRaza/django-hawkeye
🔥3👍1 1