43 #include "ft_global.h"
46 #define FTS_NULL_DOC_ID 0
49 #define FTS_DOC_ID_COL_NAME "FTS_DOC_ID"
52 #define FTS_DOC_ID_INDEX_NAME "FTS_DOC_ID_INDEX"
54 #define FTS_DOC_ID_INDEX_NAME_LEN 16
57 #define FTS_DOC_ID_LEN 8
61 #define FTS_NUM_FIELDS_SORT 3
65 #define MAX_DOC_ID_OPT_VAL 1073741824
71 #define FTS_DOC_ID_FORMAT IB_ID_FMT
74 #define fts_write_doc_id(d, s) mach_write_to_8(d, s)
77 #define fts_read_doc_id(s) mach_read_from_8(s)
80 #define fts_bind_doc_id(i, n, v) pars_info_bind_int8_literal(i, n, v)
88 #define FTS_PROXIMITY 8
90 #define FTS_OPT_RANKING 32
92 #define FTS_INDEX_TABLE_IND_NAME "FTS_INDEX_TABLE_IND"
95 #define FTS_OPTIMIZE_THRESHOLD 10000000
97 #define FTS_DOC_ID_MAX_STEP 10000
145 #define FTS_INIT_FTS_TABLE(fts_table, m_suffix, m_type, m_table)\
147 (fts_table)->suffix = m_suffix; \
148 (fts_table)->type = m_type; \
149 (fts_table)->table_id = m_table->id; \
150 (fts_table)->parent = m_table->name; \
151 (fts_table)->table = m_table; \
154 #define FTS_INIT_INDEX_TABLE(fts_table, m_suffix, m_type, m_index)\
156 (fts_table)->suffix = m_suffix; \
157 (fts_table)->type = m_type; \
158 (fts_table)->table_id = m_index->table->id; \
159 (fts_table)->parent = m_index->table->name; \
160 (fts_table)->table = m_index->table; \
161 (fts_table)->index_id = m_index->id; \
199 que_t* docs_added_graph;
340 #define STOPWORD_NOT_INIT 0x1
341 #define STOPWORD_OFF 0x2
342 #define STOPWORD_FROM_DEFAULT 0x4
343 #define STOPWORD_USER_TABLE 0x8
345 extern const char* fts_default_stopword[];
367 #define FTS_MAX_WORD_LEN HA_FT_MAXBYTELEN
370 #define FTS_MAX_WORD_LEN_IN_CHAR HA_FT_MAXCHARLEN
376 #define fts_que_graph_free(graph) \
378 mutex_enter(&dict_sys->mutex); \
379 que_graph_free(graph); \
380 mutex_exit(&dict_sys->mutex); \
411 __attribute__((nonnull));
422 const char* table_name,
424 __attribute__((nonnull(2)));
440 __attribute__((nonnull));
469 __attribute__((nonnull(1,2)));
493 bool skip_doc_id_index)
494 __attribute__((nonnull, warn_unused_result));
506 __attribute__((nonnull, warn_unused_result));
520 const char* table_name,
522 __attribute__((nonnull, warn_unused_result));
531 __attribute__((nonnull(1)));
545 __attribute__((nonnull));
555 __attribute__((nonnull, warn_unused_result));
572 __attribute__((nonnull, warn_unused_result));
690 __attribute__((nonnull));
716 __attribute__((nonnull, warn_unused_result));
750 __attribute__((nonnull));
758 __attribute__((nonnull));
827 __attribute__((nonnull, warn_unused_result));
837 __attribute__((nonnull));
943 const char* stopword_table_name);
955 const char* global_stopword_table,
957 const char* session_stopword_table,
959 ibool stopword_is_on,
995 ibool has_cache_lock);
1016 __attribute__((nonnull));
1026 const char* new_name,