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

Laravel Scout - sortable fields won't work #3480

Closed
GautierDele opened this issue Jul 28, 2021 · 4 comments
Closed

Laravel Scout - sortable fields won't work #3480

GautierDele opened this issue Jul 28, 2021 · 4 comments
Assignees
Labels
implemented Feature Request implemented

Comments

@GautierDele
Copy link

GautierDele commented Jul 28, 2021

  • Laravel Version: 8.51.0
  • Nova Version: 3.27.0
  • PHP Version: 8.0.8
  • Database Driver & Version: MSSQL
  • Laravel Scout Version: 9.2.3 with meilisearch

Description:

Basically, it's known that you can't order by with laravel scout, the solution provided is to create another index with the sorting by default. Don't know if there is anything special to include this in Nova.
The problem on Nova is that it's not informing the user about this problem:
image
As you can see I ran a search to force scout search and sorted by id but the sort won't change anything ...

The better would be to support multiple indexes for each sortable fields but this might be heavy.

@crynobone
Copy link
Member

The main focus of Scout support is that it's will sort the search results based on the most relevant results based on each engine technology.

@GautierDele
Copy link
Author

Effectively I missed that part but that doesn't change the fact that sorting when searching won't lead to anything and can mislead users ?

@crynobone
Copy link
Member

Effectively I missed that part but that doesn't change the fact that sorting when searching won't lead to anything and can mislead users ?

I will submit a PR to hide sort button when searching via Scout.

@crynobone crynobone self-assigned this Jul 28, 2021
@crynobone
Copy link
Member

Fixed in v3.28.0: https://nova.laravel.com/releases/3.28.0

@crynobone crynobone added the implemented Feature Request implemented label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implemented Feature Request implemented
Projects
None yet
Development

No branches or pull requests

2 participants