nostrdb: nip50: add filter argument to fulltext search
Update fulltext search queries to include an optional filter. This can be used to narrow down the fulltext search. This is another step towards nip50 support in nostrdb. I noticed the code was exiting dubiously in certain situations... so we fix that as well. It's possible we were missing search results because of this. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
46541694a0
commit
094cf5e8cc
@@ -547,6 +547,7 @@ int ndb_num_subscriptions(struct ndb *);
|
||||
|
||||
// FULLTEXT SEARCH
|
||||
int ndb_text_search(struct ndb_txn *txn, const char *query, struct ndb_text_search_results *, struct ndb_text_search_config *);
|
||||
int ndb_text_search_with(struct ndb_txn *txn, const char *query, struct ndb_text_search_results *, struct ndb_text_search_config *, struct ndb_filter *filter);
|
||||
void ndb_default_text_search_config(struct ndb_text_search_config *);
|
||||
void ndb_text_search_config_set_order(struct ndb_text_search_config *, enum ndb_search_order);
|
||||
void ndb_text_search_config_set_limit(struct ndb_text_search_config *, int limit);
|
||||
|
||||
Reference in New Issue
Block a user