Home > Software engineering >  Search strategies for high volume data
Search strategies for high volume data

Time:12-19

In websites such as e-commerce where many listings would appear for a given search, what does the communication between client and server look like? I understand that the search term is sent over to the server and the server would then create a ranking of the listings so that the results appear in an appropriate order. But once such ranking is created, the server will not obviously send every single listing in one go. Instead, the client sees listings organised in pages. Does this mean that the server creates a data stream of the listings?

CodePudding user response:

There are many ways in which such paginated results are displayed in the client, it depends on the various implementation choices that are available based on the server & client side tech stack. Your question is very broad, if you implement one of the mechanism and face issues or errors and share details , the SO community can help.

One of the mechanism available : pagination can be supported by the database, for instance SQL SERVER supports OFFSET...FETCH NEXT n ROWS, and also keyset pagination, ranking over row_number() each has its merits and demerits.

  • Related