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
24
extern
"C"
{
25
#endif
26
37
typedef
struct
grn_extract_data
grn_extract_data
;
38
51
GRN_PLUGIN_EXPORT
grn_obj
*
52
grn_extract_data_get_value
(
grn_ctx
*ctx,
grn_extract_data
*data);
53
64
GRN_PLUGIN_EXPORT
grn_obj
*
65
grn_extract_data_get_table
(
grn_ctx
*ctx,
grn_extract_data
*data);
66
77
GRN_PLUGIN_EXPORT
uint32_t
78
grn_extract_data_get_index
(
grn_ctx
*ctx,
grn_extract_data
*data);
79
103
typedef
grn_obj
*
104
grn_extractor_extract_func
(
grn_ctx
*ctx,
105
grn_obj
*extractor,
106
grn_extract_data
*data);
107
123
GRN_PLUGIN_EXPORT
grn_obj
*
124
grn_extractor_create
(
grn_ctx
*ctx,
const
char
*name,
int
name_length);
125
138
GRN_PLUGIN_EXPORT
grn_rc
139
grn_extractor_set_extract_func
(
grn_ctx
*ctx,
140
grn_obj
*extractor,
141
grn_extractor_extract_func
*extract);
142
143
#ifdef __cplusplus
144
}
145
#endif
grn_extractor_set_extract_func
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_extract_data_get_value
GRN_PLUGIN_EXPORT grn_obj * grn_extract_data_get_value(grn_ctx *ctx, grn_extract_data *data)
Return the extract target value.
grn_extractor_create
GRN_PLUGIN_EXPORT grn_obj * grn_extractor_create(grn_ctx *ctx, const char *name, int name_length)
Create an extractor.
grn_extractor_extract_func
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_extract_data_get_table
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.
grn_extract_data
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_extract_data_get_index
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
grn_rc
Definition
groonga.h:61
GRN_PLUGIN_EXPORT
#define GRN_PLUGIN_EXPORT
Definition
plugin.h:50
_grn_ctx
Definition
groonga.h:351
_grn_obj
Definition
groonga.h:919
tokenizer.h
include
groonga
extractor.h
Generated by
1.9.8