Top | ![]() |
![]() |
![]() |
![]() |
DzlFuzzyIndexBuilder * | dzl_fuzzy_index_builder_new () |
gboolean | dzl_fuzzy_index_builder_get_case_sensitive () |
void | dzl_fuzzy_index_builder_set_case_sensitive () |
guint64 | dzl_fuzzy_index_builder_insert () |
gboolean | dzl_fuzzy_index_builder_write () |
void | dzl_fuzzy_index_builder_write_async () |
gboolean | dzl_fuzzy_index_builder_write_finish () |
const GVariant * | dzl_fuzzy_index_builder_get_document () |
void | dzl_fuzzy_index_builder_set_metadata () |
void | dzl_fuzzy_index_builder_set_metadata_string () |
void | dzl_fuzzy_index_builder_set_metadata_uint32 () |
void | dzl_fuzzy_index_builder_set_metadata_uint64 () |
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.
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
);