プロジェクト

全般

プロフィール

Vote #78271

未完了

Add rank in search result as data attribute

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Search engine_16
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
16
version_id:
32
issue_org_id:
25198
author_id:
750
assigned_to_id:
0
comments:
5
status_id:
1
tracker_id:
2
plus1:
3
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

I'm developing full text search plugin for Redmine[1].
I want to add rank (score) to search result to check search result rank(score) easily.
(It it very hard to read debug log in real time.)
Currently I need overwrite app/views/search/index.html.erb and app/views/search/index.api.rsb completely to add rank to search result.
But I don't want to keep maintaining views in my plugin because it is very annoying to keep following upstream changes.

This tiny patch provides functionality to display rank(score) in search result.
I don't add CSS to display data-rank attribute in search result html by default.

We can display data-rank value in search result using following CSS:


#search-results dt a::after {
  content: " (" attr(data-rank) ")";
  color: gray;
  font-size: x-small;
};

fn1. https://github.com/okkez/redmine_full_text_search


journals

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0