lucene-wrapper.h revision c25356d5978632df6203437e1953bcb29e0c736f
2454dfa32c93c20a8522c6ed42fe057baaac9f9aStephan Bosch#ifndef LUCENE_WRAPPER_H
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen#define LUCENE_WRAPPER_H
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen#include "fts-api-private.h"
dfa2201c6ac8ddb2d2798dee15662cfe774e644eMartti Rannanjärvi
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainenstruct lucene_index *lucene_index_init(const char *path, const char *lock_path);
fd8b93ca5cbeba64fe6fa5dc98a3e580fb046791Timo Sirainenvoid lucene_index_deinit(struct lucene_index *index);
472369cba85d9f7c995dda60e7cd01d78b4a960aTimo Sirainen
e28fa207d1a097fa6e4a867f74ee0761472ef1ceTimo Sirainenint lucene_index_select_mailbox(struct lucene_index *index,
37847ec8eaec9ad55c9df10ae109efe7b37ac573Timo Sirainen const char *mailbox_name);
bd4e36a8cd7257cca7d1434c49a1e343ed7c5100Timo Sirainenint lucene_index_get_last_uid(struct lucene_index *index, uint32_t *last_uid_r);
adb6413686e52e00dded4932babcc08ff041876bTimo Sirainen
b1f37113a5760bee842c5a7678bb5fa6f5bd8b60Timo Sirainenint lucene_index_build_init(struct lucene_index *index, uint32_t *last_uid_r);
1c1cecd3dfaf71b0c9499b044023e631841e88aaTimo Sirainenint lucene_index_build_more(struct lucene_index *index, uint32_t uid,
94d8e51119003d2bc5a100c663f90141f297385dTimo Sirainen const unsigned char *data, size_t size,
9393445a6dabd17ce62ebfc12fd73545b0065824Timo Sirainen bool headers);
697ff56bf3cdc9e7989ea2a70accf866b14b64d1Timo Sirainenint lucene_index_build_deinit(struct lucene_index *index);
e28fa207d1a097fa6e4a867f74ee0761472ef1ceTimo Sirainen
37847ec8eaec9ad55c9df10ae109efe7b37ac573Timo Sirainenint lucene_index_expunge(struct lucene_index *index, uint32_t uid);
ef50336eefcb9ba99f73c6af37420eaf8857a39bTimo Sirainen
d2e74f2af690b8e2d536400f02f397cbed1334b7Timo Sirainenint lucene_index_lookup(struct lucene_index *index, enum fts_lookup_flags flags,
13d98ffa534f2e7d04a832c9d0153fc9c568b878Timo Sirainen const char *key, ARRAY_TYPE(seq_range) *result);
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen#endif
a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3Timo Sirainen