Increase default capacity in SearchIndexWrapper and enhance similarity calculation in calculate_similarity function to boost similarity score when all query words are found. Update MAX_WORDS and MAX_STRING_LEN definitions for improved handling.

This commit is contained in:
seb
2025-04-18 09:16:26 +02:00
parent ca2c86ce33
commit 6091cc0b80
3 changed files with 25 additions and 8 deletions

View File

@@ -5,8 +5,8 @@
extern "C" {
#endif
#define MAX_STRING_LEN 100
#define MAX_WORDS 20
#define MAX_STRING_LEN 1000
#define MAX_WORDS 100
// Public API
@@ -19,7 +19,7 @@ typedef struct {
// Structure to hold a search result
typedef struct {
const char *string;
char *string;
float similarity;
} SearchResult;