mirror of
git://jb55.com/damus
synced 2024-10-04 19:00:42 +00:00
nostrdb/refactor: move search key printer in case we need it
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
06445de197
commit
3e5d7581ba
@ -2465,6 +2465,14 @@ static int prefix_count(const char *str1, int len1, const char *str2, int len2)
|
||||
return count;
|
||||
}
|
||||
|
||||
static void ndb_print_text_search_key(struct ndb_text_search_key *key)
|
||||
{
|
||||
printf("K<'%.*s' %d %" PRIu64 " note_id:%" PRIu64 ">", key->str_len, key->str,
|
||||
key->word_index,
|
||||
key->timestamp,
|
||||
key->note_id);
|
||||
}
|
||||
|
||||
|
||||
// This is called when scanning the full text search index. Scanning stops
|
||||
// when we no longer have a prefix match for the word
|
||||
@ -2579,14 +2587,6 @@ static void ndb_text_search_results_init(
|
||||
results->num_results = 0;
|
||||
}
|
||||
|
||||
static void ndb_print_text_search_key(struct ndb_text_search_key *key)
|
||||
{
|
||||
printf("K<'%.*s' %d %" PRIu64 " note_id:%" PRIu64 ">", key->str_len, key->str,
|
||||
key->word_index,
|
||||
key->timestamp,
|
||||
key->note_id);
|
||||
}
|
||||
|
||||
void ndb_default_text_search_config(struct ndb_text_search_config *cfg)
|
||||
{
|
||||
cfg->order = NDB_ORDER_DESCENDING;
|
||||
|
Loading…
Reference in New Issue
Block a user