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

[BUG] - Next page doesn't work in search tab when a previous search got sorted #261

Closed
maurin-at-homiwoo opened this issue Sep 12, 2024 · 4 comments
Assignees
Labels

Comments

@maurin-at-homiwoo
Copy link

Description
When you click the button to go to the next page in the search tab, all results disappear and the following error message is diplayed :
Error: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [endDate] in order to sort on","index_uuid":"oITiBx_-T-uq6kGxN1VQAQ","index":"ext_data_cadastre_plot_20240614114839"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"ext_data_cadastre_plot_20240614114839","node":"o5rNrG5uQpqxksUyMCxh1Q","reason":{"type":"query_shard_exception","reason":"No mapping found for [endDate] in order to sort on","index_uuid":"oITiBx_-T-uq6kGxN1VQAQ","index":"ext_data_cadastre_plot_20240614114839"}}]},"status":400}

This happen when I previously ordered results in a different index on a column that doesn't exist in my current index.

Please describe your problem here.

Steps To Reproduce
List the steps to reproduce your problem:

  1. Open elasticvue
  2. Create 2 index, with different columns (or use existing one)
  3. Do a search on the first one, order on a column that doesn't exists in the second one
  4. Go to the next page of the results
  5. Go back to the indices tab
  6. Click on your second index to open the search tab on it
  7. Try to go on the next page without ordering the result
  8. You should get the error

Screenshots

Environment (please include the following information):

  • Elasticsearch version: 8.10.2
  • Operating system: Ubuntu 22.04
  • Browser + version: Chrome
  • Elasticvue version: 1.0.11
  • How are you running elasticvue? (docker, browser extension, web app): Browser extension

Additional context
The issue dissapears if I reset and disconnect, but it is still a bit blocking when you frequently use the search tab. If I restart the browser, the issue is still here as the ordering column seems to be persisted through reboot and restart.

@cars10
Copy link
Owner

cars10 commented Sep 12, 2024

While inconvenient, this is expected behaviour. Many users want to save previous sort settings.
You can simply click "reset query" to remove the previous query that is saved, does that fix your issue?

@maurin-at-homiwoo
Copy link
Author

The button reset query doesn't seem to work for me, as soon as I hit the next page button, the error comes back.

When I arrive on the page, i get the first result, not sorted :
image

Then, I hit next page, i get the error :
image

I click the reset button, the page comes back, the counter on the bottom right now show 11 - 20 but it is still the same items displayed :
image

I click next page, i get the error again :
image

And so on, so I cannot reach the page 2 of the results.

Also, it seems that the flag track_total_hits is not set to true as the number of results displayed it 10 000 (and I have more than that in this index).

@cars10 cars10 added bug and removed unconfirmed labels Sep 12, 2024
@cars10
Copy link
Owner

cars10 commented Sep 12, 2024

Thanks for the detailed response! You are right - this should not happen. I will fix this :)

@maurin-at-homiwoo
Copy link
Author

You're the one to thank here for this really nice app and the support you're doing for it ! It's really cool to see all the new features and how reactive you are !

@cars10 cars10 closed this as completed in 2fae910 Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants