nostrdb/search: add limit param

If we only care to have a certain number of results

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2023-12-01 16:21:25 -08:00
parent bec92249f9
commit 01c239c0eb
2 changed files with 5 additions and 3 deletions

View File

@@ -377,7 +377,7 @@ void ndb_filter_end_field(struct ndb_filter *);
void ndb_filter_free(struct ndb_filter *filter);
// FULLTEXT SEARCH
int ndb_text_search(struct ndb_txn *txn, const char *query, struct ndb_text_search_results *);
int ndb_text_search(struct ndb_txn *txn, const char *query, struct ndb_text_search_results *, int limit);
// stats
int ndb_stat(struct ndb *ndb, struct ndb_stat *stat);