nostrdb: Implement nip50 fulltext searching

This adds support for nip50 fulltext searches. This allows you to use
the nostrdb query interface for executing fulltext searches instead of
the typical `ndb_text_search` api. The benefits of this include a
standardized query interface that also further filters on other fields
in the filter.

Changelog-Added: Add nip50 search filters and queries
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-01-13 18:19:22 -08:00
committed by Daniel D’Aquino
parent 094cf5e8cc
commit 37f9c93705
2 changed files with 101 additions and 19 deletions

View File

@@ -314,6 +314,10 @@ struct ndb_text_search_key
struct ndb_text_search_result {
struct ndb_text_search_key key;
int prefix_chars;
// This is only set if we passed a filter for nip50 searches
struct ndb_note *note;
uint64_t note_size;
};
struct ndb_text_search_results {