groonga - オープンソースのカラムストア機能付き全文検索エンジン

8.14.6. grn_expr

grn_expr is an grn_obj that represents an expression. Here is a list of what expression can do:

There are two string representations of expression:

:c:function:`grn_expr_parse` parses string represented expression and appends the parsed expression to another expression.

8.14.6.1. 実行例:

TODO...

8.14.6.2. リファレンス

grn_rc grn_expr_syntax_escape(grn_ctx *ctx, const char *string, int string_size, const char *target_characters, char escape_character, grn_obj *escaped_string)

Escapes target_characters in string by escape_character.

パラメタ:
  • ctx -- Its encoding must be the same encoding of string. It is used for allocating buffer for escaped_string.
  • string -- String expression representation.
  • string_size -- The byte size of string. -1 means string is NULL terminated string.
  • target_characters -- NULL terminated escape target characters. For example, "+-><~*()\"\\:" is target_characters for クエリー構文.
  • escape_character --

    The character to use escape a character in target_characters. For example, \\ (backslash) is escaped_character for

  • escaped_string -- The output of escaped string. It should be text typed bulk.
戻り値:

成功時は GRN_SUCCESS 、エラー時は GRN_SUCCESS 以外。

grn_rc grn_expr_syntax_escape_query(grn_ctx *ctx, const char *query, int query_size, grn_obj *escaped_query)

Escapes special characters in クエリー構文.

パラメタ:
  • ctx -- Its encoding must be the same encoding of query. It is used for allocating buffer for escaped_query.
  • query -- String expression representation in クエリー構文.
  • query_size -- The byte size of query. -1 means query is NULL terminated string.
  • escaped_query -- The output of escaped query. It should be text typed bulk.
戻り値:

成功時は GRN_SUCCESS 、エラー時は GRN_SUCCESS 以外。

目次

前のトピックへ

8.14.5. grn_encoding

次のトピックへ

8.14.7. grn_geo

このページ