appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: table widget does not show search results with elasticsearch query string when it has multiple words

Open josh9383 opened this issue 3 years ago • 1 comments

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

  1. Add Elasticsearch as datasource
  2. 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
  3. Connect table with JS snippet to use query results as data source
  4. Test with single word search - works
  5. Test with two words separated by space - does not work, results are retrieved but not displayed
  6. 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

josh9383 avatar Oct 18 '22 15:10 josh9383

Thanks for creating the bug @josh9383 can you also add a screenshot or a video for us to know the query response.

dilippitchika avatar Oct 18 '22 16:10 dilippitchika

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.

josh9383 avatar Oct 19 '22 04:10 josh9383

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.

josh9383 avatar Oct 19 '22 12:10 josh9383

Thanks for the information @josh9383 i will update our docs

dilippitchika avatar Oct 19 '22 13:10 dilippitchika