3

My existing system has some search SQL procedures that returns the data based on some filters. Now, to improve searches we have decided to use Elasticsearch for all our searches. We are in phase of making a prototype for now.

Below is what i have done till now:-

  1. De-normalize all the data from my RDBMS and store into Elasticsearch using Logstash.
  2. Query data from Elasticsearch based on the parameters using Elastisearch SQL API.

The main problem is the Pagination. Elasticsearch Sql has support for sending fetch_size parameter and in result it returns the cursor for the next set of records.

Cursor is fine if you want to get to the next paged set of results, but if a user wants to go from page 10 to page 100, how can we achieve that ?

I also searched for offset and skip support in elasticsearch SQL but could not find any references.

Has anyone faced such an issue ? I would appreciate any help or suggestions.

I tried to follow the link https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-pagination.html

{ "query" : "Select client_clientid, clientpolicy_policyname from client_paged_list group by client_clientid, clientpolicy_policyname", "fetch_size": 5 }

Ajay kumar
  • 53
  • 6

0 Answers0