[Groonga-commit] pgroonga/pgroonga.github.io at 1a299ed [master] Translate pgroonga.score

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 8 22:17:36 JST 2015


Kouhei Sutou	2015-10-08 22:17:36 +0900 (Thu, 08 Oct 2015)

  New Revision: 1a299edf58a5e4786ed07fde226aa631c566b3b9
  https://github.com/pgroonga/pgroonga.github.io/commit/1a299edf58a5e4786ed07fde226aa631c566b3b9

  Message:
    Translate pgroonga.score

  Modified files:
    reference/functions/pgroonga-score.md
    tutorial/index.md

  Modified: reference/functions/pgroonga-score.md (+9 -9)
===================================================================
--- reference/functions/pgroonga-score.md    2015-10-07 00:12:49 +0900 (a8df322)
+++ reference/functions/pgroonga-score.md    2015-10-08 22:17:36 +0900 (c30d0d5)
@@ -5,17 +5,17 @@ layout: en
 
 # `pgroonga.score` function
 
-TODO
+You can use `pgroonga.score` function to retrieve score as number. Score is how the record is precise.
 
-`pgroonga.score` function always returns `0` when full text search is performed by sequential scan not index scan.
+You need to add the column that is specified as primary key to index targets to use `pgroonga.score` function. If your PGroonga index doesn't have the column that is specified as primary key, `pgroonga.score` function always returns `0`.
 
-スコアーが返るはずなのに`0`が返るときは次の2点を確認してください。
+`pgroonga.score` function always returns `0` when full text search isn't performed by index. In other words, `pgroonga.score` function always returns `0` when full text search is performed by sequential scan.
 
-  * プライマリーキーのカラムがインデックス対象に含まれているか
-  * インデックスを使って全文検索を実行しているか
+If `pgroonga.score` function returns `0` unexpectedly, confirm the followings:
 
+  * Whether the column that is specified as primary key is included in index targets of the PGroonga index or not
+  * Whether the full text search is performed by index or not
 
-現時点では適合度は「キーワードを含んでいる数」になります。Groongaには
-キーワードや検索対象カラム毎に重みをつける機能や適合度の計算方法をカス
-タマイズする機能があります。しかし、PostgreSQLらしく指定するAPIを思い
-ついていないためPGroongaから使うことはできません。
+Score is "how many keywords are included" (TF, Term Frequency) for now. Groonga supports customizing how to score. But PGroonga doesn't support yet it for now.
+
+See also [examples in tutorial](../../tutorial/#score).

  Modified: tutorial/index.md (+2 -0)
===================================================================
--- tutorial/index.md    2015-10-07 00:12:49 +0900 (b9dfd82)
+++ tutorial/index.md    2015-10-08 22:17:36 +0900 (91f0dde)
@@ -125,6 +125,8 @@ SELECT * FROM memos WHERE content %% '全文検索';
 
 See [LIKE operator](../reference/operators/like.html) for more details.
 
+{: #score}
+
 ### Score
 
 You can use `pgroonga.score` function to get precision as a number. If a record is more precision against searched query, the record has more higher number.
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index