{"action":"closed","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1067","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1067/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1067/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1067/events","html_url":"https://github.com/sphinx-doc/testing2/issues/1067","id":53293254,"number":1067,"title":"Better search results","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/other","name":"other","color":"FFFFFF"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/proposal","name":"proposal","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-03T03:56:44Z","updated_at":"2015-01-03T03:56:45Z","closed_at":"2015-01-03T03:56:45Z","body":"This proposal is motivated by the desire to have better search results in the Python Docs. See [mail thread](http://mail.python.org/pipermail/python-ideas/2012-December/018398.html)\n\nWhile a Google search will **always** yield better results, I think that there is room for improvement without increasing the complexity of the sphinx codebase. However, what constitutes a good result might depend on the project using sphinx. Therefore, the proposed solution has a javascript snippet that can be inserted in searchtool.js in a similar way to the language related code (stemmer, stop words).\n\n1. Modify the indexer to include the words in the section titles in a separate list. Remove these words from the regular list. \nThis modification increase the size of the index between 2&#37; and 10&#37; depending on the project docs (I tested Python, sphinx and flask). The time to generate the index does not change significantly, at least when the docs are generated from scratch. See patch 01.\n\n2.- Modify the search tool to create single result set (instead of the current 4: regular, important, unimportantResults, objectResults). Each result has an associated score. Sort by score before presenting the results. This modification does not seem to change the search time significantly, but I will be happy if somebody could provide better stats. See patch 02.\n\n3.- Create a pluggable scoring javascript mechanism that can be easily changed by the projects using sphinx (e.g. in the theme or in conf.py) (ToDo)\n\nThis plan seems promising, but I would appreciate some feedback before moving on.\n\nHernan\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/1067\n- Originally reported by: Hernan Grecco\n- Originally created at: 2013-01-02T12:17:46.574\n"}}