更新用API

sen_index_upd関数

basic APIに含まれる更新用API sen_index_upd関数。

sen_rc sen_index_upd(sen_index *index,
                     const void *key,
                     const char *oldvalue,
                     unsigned int oldvalue_len,
                     const char *newvalue,
                     unsigned int newvalue_len);
  • index ... 対象の転置インデックスファイル
  • key ... インデックス内におけるキー
  • oldvalue ... 前回インデックスに登録した時の値
  • oldvalue_len ... oldvalueのbyte長
  • newvalue ... 新しくインデックスに登録する値
  • newvalue_len ... newvalueのbyte長

sen_index_update関数

advanced APIに含まれる更新用API sen_index_update関数。

sen_rc sen_index_update(sen_index *index,
                        const void *key,
                        unsigned int section,
                        sen_values *oldvalue,
                        sen_values *newvalue);
  • index ... 対象の転置インデックスファイル
  • key ... インデックス内のキー
  • section ... セクション番号
  • oldvalue ... 前回インデックスに登録した時の値
  • newvalue ... 新しくインデックスに登録する値

どちらも新規文書である場合はoldvalueにNULLを指定し、oldvalue_lenに0を指定。文書を削除する場合はnewvalueにNULLを指定し、newvalue_lenに0を指定。