Debian Codegraph @

doc/source/reference/grn_expr.rst

raw
1 .. -*- rst -*-
2
3 grn_expr
4 ========
5
6 Grn_expr is an object that searches records with specified conditions
7 and manipulates a database. It's pronounced as ``gurun expression``.
8
9 Conditions for searching records from a database can be represented by
10 conbining condition expressions such as ``equal condition expression``
11 and ``less than condition expression`` with set operations such as
12 ``AND``, ``OR`` and ``NOT``. Grn_expr executes those conditions to
13 search records. You can also use advanced searches such as similar
14 search and near search by grn_expr. You can also use flexible full
15 text search. For example, you can control hit scores for specified
16 words and improve recall by re-searching with high-recall algorithm
17 dynamically. To determine whether re-searching or not, the number of
18 matched rescords is used.
19
20 There are three ways to create grn_expr:
21
22 * Parsing :doc:`/reference/grn_expr/query_syntax` string.
23 * Parsing :doc:`/reference/grn_expr/script_syntax` string.
24 * Calling grn_expr related APIs.
25
26 :doc:`/reference/grn_expr/query_syntax` is for common search form in
27 Internet search site. It's simple and easy to use but it has a
28 limitation. You can not use all condition expressions and set
29 operations in :doc:`/reference/grn_expr/query_syntax`. You can use
30 :doc:`/reference/grn_expr/query_syntax` with ``query`` option in
31 :doc:`/reference/commands/select`.
32
33 :doc:`/reference/grn_expr/script_syntax` is ECMAScript like
34 syntax. You can use all condition expressions and set operations in
35 :doc:`/reference/grn_expr/script_syntax`. You can use
36 :doc:`/reference/grn_expr/script_syntax` with ``filter`` option and
37 ``scorer`` option in :doc:`/reference/commands/select`.
38
39 You can use groonga as a library and create a grn_expr by calling
40 grn_expr related APIs. You can use full features with calling APIs
41 like :doc:`/reference/grn_expr/script_syntax`. Calling APIs is useful
42 creating a custom syntax to create grn_expr. They are used in `rroonga
43 <http://ranguba.org/#about-rroonga>`_ that is Ruby bindings
44 of Groonga. Rroonga can create a grn_expr by Ruby's syntax instead of
45 parsing string.
46
47 .. toctree::
48 :maxdepth: 1
49 :glob:
50
51 grn_expr/query_syntax
52 grn_expr/script_syntax
53
54 See also
55 --------
56
57 * :doc:`/reference/api/grn_expr`: grn_expr related APIs