10 pieces of data sampled by elasticsearch

such as the title.

how does elasticsearch sample 10 items from millions of data, which ensure the ranking of correlation and try not to repeat the search with the same conditions in a small number of times.


if it's a sampling, you can use random numbers.

  1. each data sets a unique numeric sequence number to identify
  2. generate 10 non-repeating random numbers in the range
  3. use es's engine to calculate correlation (scores) in ES queries
Menu