Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Change default search method and results order #127

Open
hvelarde opened this issue Dec 1, 2015 · 9 comments
Open

Change default search method and results order #127

hvelarde opened this issue Dec 1, 2015 · 9 comments
Assignees

Comments

@hvelarde
Copy link
Member

hvelarde commented Dec 1, 2015

On sites with a lot of content, using the results of a search is a pain for editors as they have to navigate until they find the item they want to include on a link:

simples1

what we want to change here is the following:

  • search by title only, as it is faster
  • return results sorted by creation date in reverse order or by relevance, as it makes more sense for editors on sites with a lot of content
@rodfersou
Copy link
Member

why not just search by title?

@davisagli
Copy link
Member

We should sort the results by relevance (the default sort) rather than by title (as it is now).

@hvelarde
Copy link
Member Author

hvelarde commented Dec 1, 2015

@davisagli editors work with search different than end users, they want the results sorted with most recent items first; also, probably it's better to search only by Title and not by SearchableText.

@davisagli
Copy link
Member

Depends whether you're looking for a recent item or not. I'd say sort by relevance by default, but also provide an option to sort by date, and ideally remember the user's previous sort.

I'm fine with searching by Title rather than SearchableText here.

@hvelarde
Copy link
Member Author

hvelarde commented Dec 1, 2015

@davisagli currently search is done on SearchableText and ordered by sortable_title which is worst than I expected; AFAIK, there is no way to return the results sorted by relevance, unless you know something that is not documented :-)

so, basically what we want to fix here is the following:

  • search by title only, as it is faster
  • return results sorted by creation date in reverse order, as it makes more sense for editors on sites with a lot of content

as we want to change the default behavior I would wait for more people to give their opinion on this.

@davisagli
Copy link
Member

Do a query that includes the SearchableText index and DO NOT specify sort_on; then it will be ordered by relevance based on the search terms.

@davisagli
Copy link
Member

@hvelarde hvelarde changed the title Search result must be returned in reverse order Change default search method and results order Dec 1, 2015
@hvelarde
Copy link
Member Author

hvelarde commented Dec 1, 2015

@davisagli so, perfect, as Title index is a ZCTextIndex results will be sorted by relevance by default; we can start by changing this then.

@hvelarde
Copy link
Member Author

hvelarde commented Dec 1, 2015

@rodfersou tests must be fixed on both branches

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants