spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.75k stars 5.88k forks source link

Consider current version of the documentation when weighting search results #11279

Open wilkinsona opened 2 years ago

wilkinsona commented 2 years ago

This is somewhat related to https://github.com/spring-projects/spring-security/issues/11056.

When there are multiple hits for the same section in different versions of the documentation, I wonder if they could be weighted based on the version of the documentation that I am searching from. For example, https://docs.spring.io/spring-security/reference/ is currently serving the documentation for Spring Security 5.7.1 so results in the 5.7.1 docs are likely to be what I am looking for. If I search for "Testing", I'm shown 10 results. Based on experience with other search engines, I'd assume that the first result is considered to be the best but it's for the 5.7.0 docs: https://docs.spring.io/spring-security/reference/5.7.0/servlet/test/index.html#page-title.

wilkinsona commented 1 year ago

The checkbox to only search in the current version addresses this somewhat. IMO, it would still be good to weight results to favour certain versions and group things together. At the moment, if I search for EnableWebSecurity I get hits in the following versions on the first page:

I can't spot much of a pattern to the ordering. I wonder if things could either be ordered consistently or if all of the hits from a certain version could be grouped together.