python / python/cpython

Ordering of search results in the docs could be improved

Abierto
#138,277 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

docs triaged
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

When searching for "str" in the documentation, for example, the built-in str type shows up 44th in the list of results currently. This specific example (as well as a general notion that the search results are often not useful) was recently cited to me by a colleague as one reason that they choose to caution beginner students against using Python's docs compared to other alternatives, because the docs are "hard to navigate" and "hard to search." I disagree with that assessment on the whole, but I do think that improving the ordering of the search results would make the docs easier to use and navigate, particularly for folks just starting out with Python.

Sphinx has a mechanism for custom sorting of search results, so it should be possible to come up with some heuristics there that improve the ordering of the results. I'll put in a PR in a little while with one small step that I think is an improvement.

Linked PRs
  • gh-138278

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Revisa el PR gh-138278 enlazado y el mecanismo personalizado de ordenación de resultados de búsqueda de Sphinx mencionado en el issue. Usa el ejemplo de búsqueda "str" como comprobación inicial y considera terminado el trabajo cuando el orden resultante sea demostrablemente más útil para los usuarios de la documentación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
documentation, search
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.