nostrdb/search: make search case insensitive

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2023-11-28 10:51:12 -08:00
parent d541153e4c
commit 8679c9f293
2 changed files with 16 additions and 2 deletions

View File

@@ -164,8 +164,8 @@ static int ndb_make_text_search_key(unsigned char *buf, int bufsize,
if (!push_varint(&cur, word_len))
return 0;
// non-null terminated string
if (!cursor_push(&cur, (unsigned char*)str, word_len))
// non-null terminated, lowercase string
if (!cursor_push_lowercase(&cur, str, word_len))
return 0;
// the index of the word in the content so that we can do more accurate