appsmith
appsmith copied to clipboard
[Bug]: table widget does not show search results with elasticsearch query string when it has multiple words
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
When I search with multiple words separated by spaces in table widget with search query on elasticsearch as datasource; I can see results are fetched and totalRowCount updated on table but results are not rendered in table.
Expected : Table widget should show results as received from query response.
Steps To Reproduce
- Add Elasticsearch as datasource
- Define query similar to : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-query-ex-request with pagination and searchText in query string
- Connect table with JS snippet to use query results as data source
- Test with single word search - works
- Test with two words separated by space - does not work, results are retrieved but not displayed
- Test same queries with elastic search directly or view results on debug console of appsmith - results are retrieved so no issues observed with data source or query.
{ "from":{{ (searchTable.pageNo - 1) * searchTable.pageSize }}, "size":{{ searchTable.pageSize }}, "_source": [ "fname", "lname" ], "query": { "query_string": { "query": "{{ searchTable.searchText? searchTable.searchText : "*"}}" } } }
Public Sample App
No response
Version
Self Hosted - CE
Thanks for creating the bug @josh9383 can you also add a screenshot or a video for us to know the query response.
Thanks for creating the bug @josh9383 can you also add a screenshot or a video for us to know the query response.
Added to details - one screenshot with two words in search with empty table display but with retrieved result. Another with single word in search with results and its display.
Hello team, I discovered that this issue shows up when both server side as well as client side search are enabled. Perhaps this is not a bug; but just needs a mention in documentation that enabling both client side search and server side search can result in conflicting issues so this should be discouraged.
Thanks for the information @josh9383 i will update our docs