Groonga
Loading...
Searching...
No Matches
extractor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2026 Sutou Kouhei <kou@clear-code.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#pragma once
20
21#include <groonga/tokenizer.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
38
53
66
77GRN_PLUGIN_EXPORT uint32_t
79
103typedef grn_obj *
105 grn_obj *extractor,
106 grn_extract_data *data);
107
124grn_extractor_create(grn_ctx *ctx, const char *name, int name_length);
125
140 grn_obj *extractor,
142
143#ifdef __cplusplus
144}
145#endif
GRN_PLUGIN_EXPORT grn_rc grn_extractor_set_extract_func(grn_ctx *ctx, grn_obj *extractor, grn_extractor_extract_func *extract)
Set an extract function to an extractor.
GRN_PLUGIN_EXPORT grn_obj * grn_extract_data_get_value(grn_ctx *ctx, grn_extract_data *data)
Return the extract target value.
GRN_PLUGIN_EXPORT grn_obj * grn_extractor_create(grn_ctx *ctx, const char *name, int name_length)
Create an extractor.
grn_obj * grn_extractor_extract_func(grn_ctx *ctx, grn_obj *extractor, grn_extract_data *data)
A function that implements extraction feature for an extractor.
Definition extractor.h:104
GRN_PLUGIN_EXPORT grn_obj * grn_extract_data_get_table(grn_ctx *ctx, grn_extract_data *data)
Return the table that extracts target value belongs to.
struct grn_extract_data grn_extract_data
This is an opaque data to pass data to an extractor from Groonga.
Definition extractor.h:37
GRN_PLUGIN_EXPORT uint32_t grn_extract_data_get_index(grn_ctx *ctx, grn_extract_data *data)
Return the index of the target extractor in the table.
grn_rc
Definition groonga.h:61
#define GRN_PLUGIN_EXPORT
Definition plugin.h:50
Definition groonga.h:351
Definition groonga.h:919