| Top |
gboolean
dzl_fuzzy_index_builder_get_case_sensitive
(DzlFuzzyIndexBuilder *self);
void dzl_fuzzy_index_builder_set_case_sensitive (DzlFuzzyIndexBuilder *self,gboolean case_sensitive);
guint64 dzl_fuzzy_index_builder_insert (DzlFuzzyIndexBuilder *self,const gchar *key,GVariant *document,guint priority);
Inserts document
into the index using key
as the lookup key.
If a matching document (checked by hashing document
) has already
been inserted, only a single instance of the document will be stored.
If document
is floating, it's floating reference will be sunk using
g_variant_ref_sink().
priority
may be used to group results by priority. Priority must be
less than 256.
gboolean dzl_fuzzy_index_builder_write (DzlFuzzyIndexBuilder *self,GFile *file,gint io_priority,GCancellable *cancellable,GError **error);
void dzl_fuzzy_index_builder_write_async (DzlFuzzyIndexBuilder *self,GFile *file,gint io_priority,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Builds and writes the index to file
. The file format is a
GVariant on disk and can be loaded and searched using
FuzzyIndex.
self |
||
file |
A GFile to write the index to |
|
io_priority |
The priority for IO operations |
|
cancellable |
An optional GCancellable or |
[nullable] |
callback |
A callback for completion or |
|
user_data |
User data for |
gboolean dzl_fuzzy_index_builder_write_finish (DzlFuzzyIndexBuilder *self,GAsyncResult *result,GError **error);
const GVariant * dzl_fuzzy_index_builder_get_document (DzlFuzzyIndexBuilder *self,guint64 document_id);
Returns the document that was inserted in a previous call to
dzl_fuzzy_index_builder_insert().
void dzl_fuzzy_index_builder_set_metadata (DzlFuzzyIndexBuilder *self,const gchar *key,GVariant *value);
void dzl_fuzzy_index_builder_set_metadata_string (DzlFuzzyIndexBuilder *self,const gchar *key,const gchar *value);
void dzl_fuzzy_index_builder_set_metadata_uint32 (DzlFuzzyIndexBuilder *self,const gchar *key,guint32 value);
void dzl_fuzzy_index_builder_set_metadata_uint64 (DzlFuzzyIndexBuilder *self,const gchar *key,guint64 value);
#define DZL_TYPE_FUZZY_INDEX_BUILDER (dzl_fuzzy_index_builder_get_type())
“case-sensitive” property“case-sensitive” gboolean
Case Sensitive.
Flags: Read / Write
Default value: FALSE