{"action":"closed","number":10,"pull_request":{"url":"https://api.github.com/repos/edgewall/trac/pulls/10","id":187309763,"html_url":"https://github.com/edgewall/trac/pull/10","diff_url":"https://github.com/edgewall/trac/pull/10.diff","patch_url":"https://github.com/edgewall/trac/pull/10.patch","issue_url":"https://api.github.com/repos/edgewall/trac/issues/10","number":10,"state":"closed","locked":false,"title":"This change facilitates better ordering of search results.","user":{"login":"NetSpida","id":31419743,"avatar_url":"https://avatars2.githubusercontent.com/u/31419743?v=4","gravatar_id":"","url":"https://api.github.com/users/NetSpida","html_url":"https://github.com/NetSpida","followers_url":"https://api.github.com/users/NetSpida/followers","following_url":"https://api.github.com/users/NetSpida/following{/other_user}","gists_url":"https://api.github.com/users/NetSpida/gists{/gist_id}","starred_url":"https://api.github.com/users/NetSpida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetSpida/subscriptions","organizations_url":"https://api.github.com/users/NetSpida/orgs","repos_url":"https://api.github.com/users/NetSpida/repos","events_url":"https://api.github.com/users/NetSpida/events{/privacy}","received_events_url":"https://api.github.com/users/NetSpida/received_events","type":"User","site_admin":false},"body":"I was looking for a solution to enhance the usefulness of trac search results. Stock trac seems to sort search results by the date of last change, which might not always be what users expect. Looking for a medium solution between using complete indexing server as suggested in https://trac.edgewall.org/wiki/AdvancedSearch and the current solution, I suggest a medium solution (with regard to both complexity and quality), ordering the results based on occurrence of the search word in page/ticket title, headers and content.\r\n\r\nThe `ISearchSource` `get_search_results()` gets an optional sixth value in the return tuple called `order` which is supposed to contain a quadtuple which is to be composed of\r\n * rating for pagename/filename\r\n * rating for headings\r\n * rating for description/content\r\n * timestamp\r\nThe `order` parameter is then used to sort search results. The ratings are evaluated in above order. In each case, a higher value will signify a more relevant search result.","created_at":"2018-05-10T21:16:11Z","updated_at":"2018-05-12T16:14:11Z","closed_at":"2018-05-12T16:14:11Z","merged_at":null,"merge_commit_sha":"4ea65ccd4428cf42bcdff102548f8a2bbd5b3bea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edgewall/trac/pulls/10/commits","review_comments_url":"https://api.github.com/repos/edgewall/trac/pulls/10/comments","review_comment_url":"https://api.github.com/repos/edgewall/trac/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edgewall/trac/issues/10/comments","statuses_url":"https://api.github.com/repos/edgewall/trac/statuses/63eb43faf61504ea129543897dfa35c2960823ef","head":{"label":"NetSpida:SearchOrder","ref":"SearchOrder","sha":"63eb43faf61504ea129543897dfa35c2960823ef","user":{"login":"NetSpida","id":31419743,"avatar_url":"https://avatars2.githubusercontent.com/u/31419743?v=4","gravatar_id":"","url":"https://api.github.com/users/NetSpida","html_url":"https://github.com/NetSpida","followers_url":"https://api.github.com/users/NetSpida/followers","following_url":"https://api.github.com/users/NetSpida/following{/other_user}","gists_url":"https://api.github.com/users/NetSpida/gists{/gist_id}","starred_url":"https://api.github.com/users/NetSpida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetSpida/subscriptions","organizations_url":"https://api.github.com/users/NetSpida/orgs","repos_url":"https://api.github.com/users/NetSpida/repos","events_url":"https://api.github.com/users/NetSpida/events{/privacy}","received_events_url":"https://api.github.com/users/NetSpida/received_events","type":"User","site_admin":false},"repo":{"id":132948256,"name":"trac","full_name":"NetSpida/trac","owner":{"login":"NetSpida","id":31419743,"avatar_url":"https://avatars2.githubusercontent.com/u/31419743?v=4","gravatar_id":"","url":"https://api.github.com/users/NetSpida","html_url":"https://github.com/NetSpida","followers_url":"https://api.github.com/users/NetSpida/followers","following_url":"https://api.github.com/users/NetSpida/following{/other_user}","gists_url":"https://api.github.com/users/NetSpida/gists{/gist_id}","starred_url":"https://api.github.com/users/NetSpida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetSpida/subscriptions","organizations_url":"https://api.github.com/users/NetSpida/orgs","repos_url":"https://api.github.com/users/NetSpida/repos","events_url":"https://api.github.com/users/NetSpida/events{/privacy}","received_events_url":"https://api.github.com/users/NetSpida/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NetSpida/trac","description":"Trac is an enhanced wiki and issue tracking system for software development projects (mirror)","fork":true,"url":"https://api.github.com/repos/NetSpida/trac","forks_url":"https://api.github.com/repos/NetSpida/trac/forks","keys_url":"https://api.github.com/repos/NetSpida/trac/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NetSpida/trac/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NetSpida/trac/teams","hooks_url":"https://api.github.com/repos/NetSpida/trac/hooks","issue_events_url":"https://api.github.com/repos/NetSpida/trac/issues/events{/number}","events_url":"https://api.github.com/repos/NetSpida/trac/events","assignees_url":"https://api.github.com/repos/NetSpida/trac/assignees{/user}","branches_url":"https://api.github.com/repos/NetSpida/trac/branches{/branch}","tags_url":"https://api.github.com/repos/NetSpida/trac/tags","blobs_url":"https://api.github.com/repos/NetSpida/trac/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NetSpida/trac/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NetSpida/trac/git/refs{/sha}","trees_url":"https://api.github.com/repos/NetSpida/trac/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NetSpida/trac/statuses/{sha}","languages_url":"https://api.github.com/repos/NetSpida/trac/languages","stargazers_url":"https://api.github.com/repos/NetSpida/trac/stargazers","contributors_url":"https://api.github.com/repos/NetSpida/trac/contributors","subscribers_url":"https://api.github.com/repos/NetSpida/trac/subscribers","subscription_url":"https://api.github.com/repos/NetSpida/trac/subscription","commits_url":"https://api.github.com/repos/NetSpida/trac/commits{/sha}","git_commits_url":"https://api.github.com/repos/NetSpida/trac/git/commits{/sha}","comments_url":"https://api.github.com/repos/NetSpida/trac/comments{/number}","issue_comment_url":"https://api.github.com/repos/NetSpida/trac/issues/comments{/number}","contents_url":"https://api.github.com/repos/NetSpida/trac/contents/{+path}","compare_url":"https://api.github.com/repos/NetSpida/trac/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NetSpida/trac/merges","archive_url":"https://api.github.com/repos/NetSpida/trac/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NetSpida/trac/downloads","issues_url":"https://api.github.com/repos/NetSpida/trac/issues{/number}","pulls_url":"https://api.github.com/repos/NetSpida/trac/pulls{/number}","milestones_url":"https://api.github.com/repos/NetSpida/trac/milestones{/number}","notifications_url":"https://api.github.com/repos/NetSpida/trac/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NetSpida/trac/labels{/name}","releases_url":"https://api.github.com/repos/NetSpida/trac/releases{/id}","deployments_url":"https://api.github.com/repos/NetSpida/trac/deployments","created_at":"2018-05-10T19:59:09Z","updated_at":"2018-05-10T19:59:14Z","pushed_at":"2018-05-10T21:14:46Z","git_url":"git://github.com/NetSpida/trac.git","ssh_url":"git@github.com:NetSpida/trac.git","clone_url":"https://github.com/NetSpida/trac.git","svn_url":"https://github.com/NetSpida/trac","homepage":"https://trac.edgewall.org/","size":37263,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"edgewall:trunk","ref":"trunk","sha":"6ad75b926591e114ba504f6a72a38fd305d77fb1","user":{"login":"edgewall","id":246118,"avatar_url":"https://avatars1.githubusercontent.com/u/246118?v=4","gravatar_id":"","url":"https://api.github.com/users/edgewall","html_url":"https://github.com/edgewall","followers_url":"https://api.github.com/users/edgewall/followers","following_url":"https://api.github.com/users/edgewall/following{/other_user}","gists_url":"https://api.github.com/users/edgewall/gists{/gist_id}","starred_url":"https://api.github.com/users/edgewall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edgewall/subscriptions","organizations_url":"https://api.github.com/users/edgewall/orgs","repos_url":"https://api.github.com/users/edgewall/repos","events_url":"https://api.github.com/users/edgewall/events{/privacy}","received_events_url":"https://api.github.com/users/edgewall/received_events","type":"Organization","site_admin":false},"repo":{"id":615096,"name":"trac","full_name":"edgewall/trac","owner":{"login":"edgewall","id":246118,"avatar_url":"https://avatars1.githubusercontent.com/u/246118?v=4","gravatar_id":"","url":"https://api.github.com/users/edgewall","html_url":"https://github.com/edgewall","followers_url":"https://api.github.com/users/edgewall/followers","following_url":"https://api.github.com/users/edgewall/following{/other_user}","gists_url":"https://api.github.com/users/edgewall/gists{/gist_id}","starred_url":"https://api.github.com/users/edgewall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edgewall/subscriptions","organizations_url":"https://api.github.com/users/edgewall/orgs","repos_url":"https://api.github.com/users/edgewall/repos","events_url":"https://api.github.com/users/edgewall/events{/privacy}","received_events_url":"https://api.github.com/users/edgewall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edgewall/trac","description":"Trac is an enhanced wiki and issue tracking system for software development projects (mirror)","fork":false,"url":"https://api.github.com/repos/edgewall/trac","forks_url":"https://api.github.com/repos/edgewall/trac/forks","keys_url":"https://api.github.com/repos/edgewall/trac/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edgewall/trac/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edgewall/trac/teams","hooks_url":"https://api.github.com/repos/edgewall/trac/hooks","issue_events_url":"https://api.github.com/repos/edgewall/trac/issues/events{/number}","events_url":"https://api.github.com/repos/edgewall/trac/events","assignees_url":"https://api.github.com/repos/edgewall/trac/assignees{/user}","branches_url":"https://api.github.com/repos/edgewall/trac/branches{/branch}","tags_url":"https://api.github.com/repos/edgewall/trac/tags","blobs_url":"https://api.github.com/repos/edgewall/trac/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edgewall/trac/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edgewall/trac/git/refs{/sha}","trees_url":"https://api.github.com/repos/edgewall/trac/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edgewall/trac/statuses/{sha}","languages_url":"https://api.github.com/repos/edgewall/trac/languages","stargazers_url":"https://api.github.com/repos/edgewall/trac/stargazers","contributors_url":"https://api.github.com/repos/edgewall/trac/contributors","subscribers_url":"https://api.github.com/repos/edgewall/trac/subscribers","subscription_url":"https://api.github.com/repos/edgewall/trac/subscription","commits_url":"https://api.github.com/repos/edgewall/trac/commits{/sha}","git_commits_url":"https://api.github.com/repos/edgewall/trac/git/commits{/sha}","comments_url":"https://api.github.com/repos/edgewall/trac/comments{/number}","issue_comment_url":"https://api.github.com/repos/edgewall/trac/issues/comments{/number}","contents_url":"https://api.github.com/repos/edgewall/trac/contents/{+path}","compare_url":"https://api.github.com/repos/edgewall/trac/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edgewall/trac/merges","archive_url":"https://api.github.com/repos/edgewall/trac/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edgewall/trac/downloads","issues_url":"https://api.github.com/repos/edgewall/trac/issues{/number}","pulls_url":"https://api.github.com/repos/edgewall/trac/pulls{/number}","milestones_url":"https://api.github.com/repos/edgewall/trac/milestones{/number}","notifications_url":"https://api.github.com/repos/edgewall/trac/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edgewall/trac/labels{/name}","releases_url":"https://api.github.com/repos/edgewall/trac/releases{/id}","deployments_url":"https://api.github.com/repos/edgewall/trac/deployments","created_at":"2010-04-17T15:10:51Z","updated_at":"2018-05-12T04:49:40Z","pushed_at":"2018-05-12T04:49:38Z","git_url":"git://github.com/edgewall/trac.git","ssh_url":"git@github.com:edgewall/trac.git","clone_url":"https://github.com/edgewall/trac.git","svn_url":"https://github.com/edgewall/trac","homepage":"https://trac.edgewall.org/","size":37259,"stargazers_count":283,"watchers_count":283,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":124,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":124,"open_issues":0,"watchers":283,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/edgewall/trac/pulls/10"},"html":{"href":"https://github.com/edgewall/trac/pull/10"},"issue":{"href":"https://api.github.com/repos/edgewall/trac/issues/10"},"comments":{"href":"https://api.github.com/repos/edgewall/trac/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/edgewall/trac/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/edgewall/trac/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edgewall/trac/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/edgewall/trac/statuses/63eb43faf61504ea129543897dfa35c2960823ef"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":90,"deletions":5,"changed_files":5}}
{"actor":{"display_login":"NetSpida"}}