36#ifndef __SIGMOD_CORE_H_
37#define __SIGMOD_CORE_H_
47#define MAX_DOC_LENGTH (1<<22)
50#define MAX_WORD_LENGTH 31
53#define MIN_WORD_LENGTH 4
56#define MAX_QUERY_WORDS 5
59#define MAX_QUERY_LENGTH ((MAX_WORD_LENGTH+1)*MAX_QUERY_WORDS)
164 const char* query_str,
166 unsigned int match_dist);
203 const char* doc_str);
235 unsigned int* p_num_res,
ErrorCode GetNextAvailRes(DocID *p_doc_id, unsigned int *p_num_res, QueryID **p_query_ids)
Return the next available active queries subset that matches any previously submitted document,...
ErrorCode InitializeIndex()
Called only once at the beginning of the whole test.
ErrorCode
Error codes:
Definition core.h:91
@ EC_NO_AVAIL_RES
Must be returned only if there is no available result to be returned by GetNextAvailRes().
Definition core.h:101
@ EC_SUCCESS
Must be returned by each core function unless specified otherwise.
Definition core.h:95
@ EC_FAIL
Used only for debugging purposes, and must not be returned in the final submission.
Definition core.h:106
MatchType
Matching types:
Definition core.h:70
@ MT_EDIT_DIST
Two words match if one of them can can be transformed into the other word by inserting,...
Definition core.h:86
@ MT_HAMMING_DIST
Two words match if they have the same number of characters, and the number of mismatching characters ...
Definition core.h:80
@ MT_EXACT_MATCH
Two words match if they are exactly the same.
Definition core.h:74
ErrorCode StartQuery(QueryID query_id, const char *query_str, MatchType match_type, unsigned int match_dist)
Add a query (associated with matching type) to the active query set.
ErrorCode EndQuery(QueryID query_id)
Remove a query from the active query set.
ErrorCode MatchDocument(DocID doc_id, const char *doc_str)
Push a document to the server.
unsigned int DocID
Document ID type.
Definition core.h:66
unsigned int QueryID
Query ID type.
Definition core.h:63
ErrorCode DestroyIndex()
Called only once at the end of the whole test.