django / djangoproject.com

Source code to djangoproject.com
https://www.djangoproject.com/
BSD 3-Clause "New" or "Revised" License
1.86k stars 939 forks source link

Search seems to give inaccurate results #1538

Closed plktagrawal closed 2 weeks ago

plktagrawal commented 3 weeks ago

If I download Django documentation in HTML format and run search, I get accurate results -- the most relevant result is on the top.

However, if the same search is done on https://docs.djangoproject.com, the results are off.

See this screen recording for a sample: https://youtu.be/6IB5w9h1buo

bmispelon commented 2 weeks ago

Hi and thanks for your report,

The two methods of searching use very different technologies, which explains the difference.

The local search (HTML) is provided by sphinx (the tool we use to build the documentation) and uses a simple text search, whereas the site search (the one available on docs.djangoproject.com) uses postgres' search functionality which is more powerful but requires more fine-tuning (see #1102 and #1097 for example).

I'm going to close this issue as a duplicate. If you have some ideas for improvements please use the other two issues I mentionned. Thanks! 🚀