Kouhei Sutou
null+****@clear*****
Tue Jun 6 14:52:53 JST 2017
Kouhei Sutou 2017-06-06 14:52:53 +0900 (Tue, 06 Jun 2017) New Revision: 46f4cdfa6defa7f6a92fed52ed6a20412ee28e66 https://github.com/pgroonga/pgroonga.github.io/commit/46f4cdfa6defa7f6a92fed52ed6a20412ee28e66 Message: query-v2: add more information Modified files: reference/operators/match-v2.md reference/operators/match.md reference/operators/query-v2.md reference/operators/query.md Modified: reference/operators/match-v2.md (+2 -0) =================================================================== --- reference/operators/match-v2.md 2017-06-06 14:40:23 +0900 (0045332) +++ reference/operators/match-v2.md 2017-06-06 14:52:53 +0900 (8dac84f) @@ -5,6 +5,8 @@ upper_level: ../ # `&@` operator +Since 1.2.0. + ## Summary `&@` operator performs full text search by one keyword. Modified: reference/operators/match.md (+2 -1) =================================================================== --- reference/operators/match.md 2017-06-06 14:40:23 +0900 (1e4a6f2) +++ reference/operators/match.md 2017-06-06 14:52:53 +0900 (c6a3b08) @@ -7,7 +7,7 @@ upper_level: ../ ## Summary -This operator is deprecated since 1.2.0. Use [`&@` operator](match-v2.html) instead. +This operator is deprecated since 1.2.0. Use [`&@` operator][match-v2] instead. `%%` operator performs full text search by one keyword. @@ -77,5 +77,6 @@ If you want to perform full text search with multiple keywords OR search, use [` * [`&@|` operator][match-in-v2] +[match-v2]:match-v2.html [query-v2]:query-v2.html [match-in-v2]:match-in-v2.html Modified: reference/operators/query-v2.md (+28 -6) =================================================================== --- reference/operators/query-v2.md 2017-06-06 14:40:23 +0900 (8787423) +++ reference/operators/query-v2.md 2017-06-06 14:52:53 +0900 (f2a418f) @@ -5,6 +5,8 @@ upper_level: ../ # `&?` operator for non `jsonb` types +Since 1.2.0. + ## Summary `&?` operator performs full text search with query. @@ -17,11 +19,27 @@ Query's syntax is similar to syntax that is used in Web search engine. For examp column &? query ``` -`column` is a column to be searched. +`column` is a column to be searched. It's `text` type, `text[]` type or `varchar` type. + +`query` is a query for full text search. It's `text` type for `text` type or `text[]` type `column. It's `varchar` type for `varchar` type `column`. + +[Groonga's query syntax][groonga-query-syntax] is used in `query`. + +## Operator classes + +You need to specify one of the following operator classes to use this operator: + + * `pgroonga.text_full_text_search_ops`: Default for `text`. -`query` is a query for full text search. It's `text` type. + * `pgroonga.text_array_full_text_search_ops`: Default for `text[]`. -[Groonga's query syntax](http://groonga.org/docs/reference/grn_expr/query_syntax.html) is used in `query`. + * `pgroonga.varchar_full_text_search_ops`: For `varchar`. + + * `pgroonga.text_full_text_search_ops_v2`: For `text`. + + * `pgroonga.text_array_full_text_search_ops_v2`: For `text[]`. + + * `pgroonga.varchar_full_text_search_ops_v2`: For `varchar`. ## Usage @@ -54,7 +72,7 @@ SELECT * FROM memos WHERE content &? 'PGroonga OR PostgreSQL'; -- (2 rows) ``` -See [Groonga document](http://groonga.org/docs/reference/grn_expr/query_syntax.html) for query syntax details. +See [Groonga document][groonga-query-syntax] for query syntax details. Note that you can't use syntax that starts with `COLUMN_NAME:` like `COLUMN_NAME:@KEYWORD`. It's disabled in PGroonga. @@ -62,6 +80,10 @@ You can't use `COLUMN_NAME:^VALUE` for prefix search. You need to use `VALUE*` f ## See also - * [`&@` operator](match-v2.html) + * [`&@` operator][match-v2] + + * [Groonga's query syntax][groonga-query-syntax] + +[match-v2]:match-v2.html - * [Groonga's query syntax](http://groonga.org/docs/reference/grn_expr/query_syntax.html) +[groonga-query-syntax]:http://groonga.org/docs/reference/grn_expr/query_syntax.html Modified: reference/operators/query.md (+25 -9) =================================================================== --- reference/operators/query.md 2017-06-06 14:40:23 +0900 (05c1a0a) +++ reference/operators/query.md 2017-06-06 14:52:53 +0900 (f4e95c6) @@ -7,7 +7,7 @@ upper_level: ../ ## Summary -This operator is deprecated since 1.2.0. Use [`&?` operator](query-v2.html) instead. +This operator is deprecated since 1.2.0. Use [`&?` operator][query-v2] instead. `@@` operator performs full text search with query. @@ -19,11 +19,27 @@ Query's syntax is similar to syntax that is used in Web search engine. For examp column @@ query ``` -`column` is a column to be searched. +`column` is a column to be searched. It's `text` type, `text[]` type or `varchar` type. -`query` is a query for full text search. It's `text` type. +`query` is a query for full text search. It's `text` type for `text` type or `text[]` type `column. It's `varchar` type for `varchar` type `column`. -[Groonga's query syntax](http://groonga.org/docs/reference/grn_expr/query_syntax.html) is used in `query`. +[Groonga's query syntax][groonga-query-syntax] is used in `query`. + +## Operator classes + +You need to specify one of the following operator classes to use this operator: + + * `pgroonga.text_full_text_search_ops`: Default for `text`. + + * `pgroonga.text_array_full_text_search_ops`: Default for `text[]`. + + * `pgroonga.varchar_full_text_search_ops`: For `varchar`. + + * `pgroonga.text_full_text_search_ops_v2`: For `text`. + + * `pgroonga.text_array_full_text_search_ops_v2`: For `text[]`. + + * `pgroonga.varchar_full_text_search_ops_v2`: For `varchar`. ## Usage @@ -56,7 +72,7 @@ SELECT * FROM memos WHERE content @@ 'PGroonga OR PostgreSQL'; -- (2 rows) ``` -See [Groonga document](http://groonga.org/docs/reference/grn_expr/query_syntax.html) for query syntax details. +See [Groonga document][groonga-query-syntax] for query syntax details. Note that you can't use syntax that starts with `COLUMN_NAME:` like `COLUMN_NAME:@KEYWORD`. It's disabled in PGroonga. @@ -68,10 +84,10 @@ TODO: Describe about `SET search_path = "$user",public,pgroonga,pg_catalog;`. ## See also - * [`&@` operator](match-v2.html) + * [`&@` operator][match-v2] - * [`%%` operator](match.html) + * [Groonga's query syntax][groonga-query-syntax] - * Deprecated since 1.2.0. Use [`&@` operator](match-v2.html) instead. +[match-v2]:match-v2.html - * [Groonga's query syntax](http://groonga.org/docs/reference/grn_expr/query_syntax.html) +[groonga-query-syntax]:http://groonga.org/docs/reference/grn_expr/query_syntax.html -------------- next part -------------- HTML����������������������������...下載