Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Search Result Ordering #11

Closed
wants to merge 1 commit into from
Closed

Enhanced Search Result Ordering #11

wants to merge 1 commit into from

Conversation

NetSpida
Copy link

I was looking for a solution to enhance the usefulness of trac search results. Stock trac seems to sort search results by the date of last change, which might not always be what users expect. Looking for a medium solution between using complete indexing server as suggested in https://trac.edgewall.org/wiki/AdvancedSearch and the current solution, I suggest a medium solution (with regard to both complexity and quality), ordering the results based on occurrence of the search word in page/ticket title, headers and content.

The ISearchSource get_search_results() gets an optional sixth value in the return tuple called order which is supposed to contain a quadtuple which is to be composed of

  • rating for pagename/filename
  • rating for headings
  • rating for description/content
  • timestamp
    The order parameter is then used to sort search results. The ratings are evaluated in above order. In each case, a higher value will signify a more relevant search result.

The `ISearchSource` `get_search_results()` gets an optional sixth value
in the return tuple called `order` which is supposed to contain a
quadtuple which is to be composed of
 * rating for pagename/filename
 * rating for headings
 * rating for description/content
 * timestamp
The `order` parameter is then used to sort search results. The ratings
are evaluated in above order. In each case, a higher value will signify
a more relevant search result.
@rjollos
Copy link
Member

rjollos commented Aug 10, 2019

I added a link to this PR from #10372.

@NetSpida NetSpida closed this by deleting the head repository Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants