Debian Codegraph @

doc/source/example/reference/grn_expr/query_syntax/near_search_search.log

raw
1 Execution example::
2
3 table_create NearTokens TABLE_NO_KEY
4 # [[0,1337566253.89858,0.000355720520019531],true]
5 column_create NearTokens content COLUMN_SCALAR ShortText
6 # [[0,1337566253.89858,0.000355720520019531],true]
7 table_create NearTokenTerms TABLE_PAT_KEY ShortText \
8 --default_tokenizer TokenNgram \
9 --normalizer NormalizerNFKC130
10 # [[0,1337566253.89858,0.000355720520019531],true]
11 column_create NearTokenTerms index COLUMN_INDEX|WITH_POSITION \
12 NearTokens content
13 # [[0,1337566253.89858,0.000355720520019531],true]
14 load --table NearTokens
15 [
16 {"content": "a 1 2 3 4 5 b 6 7 8 9 10 c"},
17 {"content": "a 1 2 3 4 5 b 6 7 8 9 10 11 c"},
18 {"content": "a 1 2 3 4 5 b 6 7 8 9 10 11 12 c"}
19 ]
20 # [[0,1337566253.89858,0.000355720520019531],3]
21 select NearTokens --match_columns content --query '*N"a b c"'
22 # [
23 # [
24 # 0,
25 # 1337566253.89858,
26 # 0.000355720520019531
27 # ],
28 # [
29 # [
30 # [
31 # 1
32 # ],
33 # [
34 # [
35 # "_id",
36 # "UInt32"
37 # ],
38 # [
39 # "content",
40 # "ShortText"
41 # ]
42 # ],
43 # [
44 # 1,
45 # "a 1 2 3 4 5 b 6 7 8 9 10 c"
46 # ]
47 # ]
48 # ]
49 # ]