Opened 13 years ago
Last modified 5 years ago
#10372 new enhancement
Search in wiki should prioritize title matches and whole word matches above partial word matches
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | search system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I am searching for "tea" in my wiki. I have a page whose title is "TeaNotes", whose contents is a list of my notes for various teas where the word "tea" appears on every single line that is not a heading (13 total occurrences).
I get 6 pages of results for "tea". This wiki page appears on page 5 of 6 of search results. Right above it are completely irrelevant pages including the word "instead" (which includes "tea") with the "tea" part of it highlighted.
When results are shown from wiki pages, the order of them should be:
- Whole words matched in title
- Whole words matched in text
- Partial words matched in title
- Partial words matched in text
The order of 2 and 3 may be switched, or maybe they should be a single bracket, but any way this is done would be an improvement over the current situation.
This particular case with tea illustrates the problem of finding stuff in the wiki very clearly, but the lack of a sensible ordering of results is a problem whenever I try to find stuff in the wiki in just about any trac installation I'm using.
TitleIndex is pretty much the only way to search for things in the wiki if you have an idea of the page title (or know that you're searching for something which appears in the title).
Attachments (0)
Change History (2)
comment:1 by , 13 years ago
Component: | wiki system → search system |
---|---|
Milestone: | → next-major-0.1X |
Giving more weight to matches in the title was indeed what SearchRefactoring proposed (and what the old branch did).
And in the meantime, you can use a report:
(leave out the authors columns if you're not using SQlite - or replace by the corresponding aggregate function of your db)