須藤です。 In <20210****@jcom*****> "[groonga-dev,04840] Re: 参照されることが多い記事のスコアを上げたい" on Tue, 23 Mar 2021 13:48:53 +0900, shinonon <shino****@jcom*****> wrote: > select Mail \ > --query 'subject:@two' \ > --scorer '_score=vector_size(messageid.follow)' \ > --output_columns 'subject,_score' \ > --drilldown messageid.top > > # [[[4], > # [['subject', 'ShortText'], ['_score', 'Int32']], > # ['one two', 1], > # ['one two three', 0], > # ['one two another', 1], > # ['one two three another', 0]], > # [[1], [['_key', 'ShortText'], ['_nsubrecs', 'Int32']], ['<aaa @ zzz>', 4]]]] > > 以上より、messageid.top=<aaa @ zzz> が 4 hit していて、そのときの _score > の最大値=1 のメール 2通が "two" で検索したときの最上位メールだというこ > とが分かりました。 > > 実際には drilldown の結果が複数あるケースが多いので、そのときは個別に > _score の最大値を調べることになりますが、その処理を一回の select で行 > うことは可能でしょうか? ちょっとやりたいことを理解できていない気がするんですが、↓み たいに自分がtopなのかをチェックするといいんじゃないかと思い ました。 select Mail \ --query 'subject:@two' \ --scorer '_score=vector_size(messageid.follow)' \ --output_columns 'subject,_score,messageid == messageid.top' \ --drilldown messageid.top